Work stress has become a prominent concern in the modern professional landscape, as it can lead to reduced productivity, diminished work quality, and decreased mental well-being among employees. This study aims to evaluate and compare the performance of two machine learning algorithms, namely Random Forest and K-Nearest Neighbors (KNN), in classifying levels of work stress. The data were obtained through an online questionnaire completed by 212 respondents from various employment sectors in Indonesia. The responses were converted from Likert scale to numerical values, grouped using the K-Means clustering method, and categorized into five levels of stress, ranging from no stress to very high stress. To address data imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied. The modeling process was conducted using three different data split scenarios, namely 90:10, 80:20, and 70:30, and evaluated using metrics such as accuracy, precision, recall, f1-score, and cross-validation. The findings indicate that the Random Forest algorithm consistently outperformed KNN across all scenarios. After applying SMOTE, both algorithms showed improved performance, with the Balanced Random Forest model achieving the highest accuracy and f1-score of 92 percent in the 70:30 scenario. These results suggest that combining Random Forest with SMOTE offers an effective and reliable solution for classifying work stress levels and could be developed as an objective and efficient early detection system.
                        
                        
                        
                        
                            
                                Copyrights © 2025