When using machine-learning techniques to determine algorithms or ranking models that identify student satisfaction, algorithms are often trained and tested on a single data set, leading to bias in their performance metrics. This article aims to identify the best algorithm to classify the satisfaction of university students applying the K-fold cross-validation technique, comparing the error rates of the performance metrics before and after its application. The method used began with the collection of student opinions on the teaching performance of the social network Twitter during an academic semester. Then, sentiment analysis was used for data processing, through which it was possible to categorize the opinions of the students into “satisfied” or “dissatisfied.” The results showed that the algorithm with the lowest error rate in its performance metric was the support vector machine (SVM). In addition, it was identified that its classification probability reached an accuracy of 91.76%. It is concluded that SVM classification using K-fold cross-validation will contribute to determining which factors associated with the teacher’s didactic strategies should be improved in each class session, since traditional surveying techniques have shortcomings.