Analisis Perbandingan Algoritma K-Nearest Neighbor dan Decision Tree Pada Klasifikasi Tingkat Stress Individu - Manurung, Vanni; Rozi, Anief Fauzan (TIN: Terapan Informatika Nusantara, 2024)
Stress is an individual’s response to changing circumstances, and high levels of stress can have a negative impact on physical and mental health. Correctly identifying stress levels is essential for appropriate medical and psychological interventions. This research aims to determine the more effective and accurate algorithm between K-Nearest Neighbor (KNN) and Decision Tree in classifying individual stress levels. The data used in this study was obtained from the “Human Stress Detection” dataset on the Kaggle website, which includes variables of humidity, temperature, step count, and stress level. The results showed that the K-Nearest Neighbor algorithm managed to achieve a perfect accuracy rate of 100%, while the Decision Tree achieved an accuracy of 99,50%. In addition, in terms of precision, recall, and F1-score, K-Nearest Neighbor also excelled with 100% each, while Decision Tree had 99,45% precision, 99,54% recall, and 99,50% F1-score. The analysis also found that high body temperature (>30°C) and high humidity (>22,5) were associated with higher stress levels. A step count below 90 can also indicate normal or high stress. Thus, this study concludes that the K-Nearest Neighbor algorithm is more effective in classifying an individual’s stress level and factors such as body temperature, humidity, and footsteps play an important role in determining an individual’s stress level.