In the teaching process of colleges and universities, there is a general lack of early-warning technology for failing grades, and teachers cannot identify the students at risk of failing grades in advance. Thus, the targeted teaching cannot be carried out in the teaching process. In order to solve the above problems, this paper studies the method of students’ score prediction based on machine learning. This paper proposes a method to predict the grade of the next semester based on the students’ test scores in previous semesters. The recognition accuracy rate of this method reached 88.78%, and the Kappa coefficient reached the “Substantial” of classification.