Cognitive radio is seen as an intelligent wireless communication system that can learn and adapt the surrounding environment. Cognitive engine is the core component of implementation of cognitive radio. Information in knowledge base of cognitive engine can be obtained by using of machine learning. In this work, we consider wireless networks with clustered nodes and OFDM physical layer and present a combined sub-channel selection and modulation and coding rate selection based on k-Nearest Neighbor classification algorithm. Computer simulation results show that, in frequency selective fading channel, the scheme makes a new network node easy to choose appropriate modulation and coding rate.