Ratio and proportion have a fundamental role in understanding mathematics and science. However, the fact is still found that students still face difficulties in carrying out the stages of formulating, applying and interpreting the process of solving mathematical problems, especially those related to ratio and proportion of material. These three problem solving processes are processes of mathematical literacy. Situations involving students' difficulties in understanding the concepts of ratio and proportion can be considered a learning obstacle. Three factors cause students to experience learning barriers, namely ontogenic barriers (mental ability to learn), didactic barriers (the impact of teacher teaching), and epistemological barriers (student knowledge that has limited context). Therefore, the aim of this research is to predict a data model related to learning obstacles experienced by students in the process of mathematical literacy skills in ratio and proportion material. Data model predictions are carried out using a data mining algorithm, namely K-Nearest Neighbor (K-NN) in Python language via Google Colab. Evaluation of the KNN algorithm using the confusion matrix method shows that the results of calculating the average accuracy of the K-NN method can predict data with an accuracy level of 89%.