Perbandingan Algoritma Random Forest dengan K-Nearest Neighbor pada Klasifikasi Tingkat Stress Pelajar - Widjaya, Falah Angka; Ngete, Maria Sarina; Tumanggor, Dedi Sapri (JATISI, 2025)
One of the most common psychological problems experienced by students is academic stress. This impacts their academic performance, mental health, and their desire to learn. The purpose of this study is to compare the performance of two classification algorithms, namely Random Forest and K-Nearest Neighbor (k-NN), in classifying student stress levels. The data obtained from the Stress Level Dataset on the Kaggle platform consists of 1,100 data points and has 20 attributes covering social, academic, and psychological factors. To ensure stable evaluation results, experiments were conducted using RapidMiner software with a ten-fold cross-validation method. Accuracy, precision, recall, and F1-score were the evaluation parameters used. The results showed that Random Forest achieved 97.55% accuracy with 97.61% precision, 97.53% recall, and 97.56% F1-score. Meanwhile, k-NN only achieved 79.18% accuracy with 83.23% precision, 78.91% recall, and 79.84% F1-score. From the results of this study, it can be concluded that Random Forest is better and more effective in classifying students' stress levels.