Abstract:In this study, the course recommendation prediction model based on k-NN algorithm has been built. Due to the original sample data of the local imbalance and data overlapped, the prediction score of the prediction model is not ideal without any parameter adjustment and data optimization. Aiming at the above problems, this study designed a set of parameter optimization scheme and sample data discretization algorithm of the prediction mode, including the best k value selection algorithm, distance formula optimization, and data discretization algorithm design. In the study, the design of the “data discretization algorithm” drives kd tree classification feature space order sorted by the weight of the characteristic vector that we expect, this algorithm plays a positive role in improving model prediction score. Therefore, all of that increases the grade of the model from 0.67 to 0.85, and the accuracy of prediction results is increased by 27 percentage points, and students' satisfaction with course recommendation is significantly improved.