Analisis Perbandingan Algoritma K-Nearest Neighbor dan Decision Tree Pada Klasifikasi Tingkat Stress Individu


  • Vanni Manurung * Mail Universitas Mercu Buana Yogyakarta, Yogyakarta, Indonesia
  • Anief Fauzan Rozi Universitas Mercu Buana Yogyakarta, Yogyakarta, Indonesia
  • (*) Corresponding Author
Keywords: Comparison; KNN; Decision Tree; Classification; Stress Levels

Abstract

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.

Downloads

Download data is not yet available.

References

Ahmad, S. R., Anissa, M., Triana, R., & Kunci, K. (2022). HUBUNGAN TINGKAT STRES DENGAN KEJADIAN INSOMNIA PADA MAHASISWA ANGKATAN 2017 FAKULTAS KEDOKTERAN UNIVERSITAS BAITURRAHMAH. Indonesian Journal for Health Sciences, 6(1), 1–7.

Alghifari, F., & Juardi, D. (2021). Penerapan Data Mining Pada Penjualan Makanan Dan Minuman Menggunakan Metode Algoritma Naïve Bayes.

Cholil, S. R., Handayani, T., Prathivi, R., & Ardianita, T. (2021). Implementasi Algoritma Klasifikasi K-Nearest Neighbor (KNN) Untuk Klasifikasi Seleksi Penerima Beasiswa. In IJCIT (Indonesian Journal on Computer and Information Technology) (Vol. 6, Issue 2).

Dhewayani, F. N., Amelia, D., Alifah, D. N., Sari, B. N., Jajuli, M., HSRonggo Waluyo, J., Telukjambe Timur, K., Karawang, K., & Barat, J. (2022). Implementasi K-Means Clustering untuk Pengelompokkan Daerah Rawan Bencana Kebakaran Menggunakan Model CRISP-DM. Jurnal Teknologi Dan Informasi. https://doi.org/10.34010/jati.v12i1

Fardiana Risa, D., Pradana, F., & Abdurrachman Bachtiar, F. (2021). IMPLEMENTASI METODE NAÏVE BAYES UNTUK MENDETEKSI STRES SISWA BERDASARKAN TWEET PADA SISTEM MONITORING STRES. https://doi.org/10.25126/jtiik.202184372

Fathirachman Mahing, N., Lazuardi Gunawan, A., Foresta Azhar Zen, A., Abdurrachman Bachtiar, F., Agung Wicaksono, S., Brawijaya, U., & Korespondensi, P. (n.d.). KLASIFIKASI TINGKAT STRES DARI DATA BERBENTUK TEKS DENGAN MENGGUNAKAN ALGORITMA SUPPORT VECTOR MACHINE (SVM) DAN RANDOM FOREST. 10(7), 2023. https://doi.org/10.25126/jtiik2023108010

Haganta Depari, D., Widiastiwi, Y., Mega Santoni, M., Ilmu Komputer, F., Pembangunan Nasional Veteran Jakarta, U., Fatmawati Raya, J. R., & Labu, P. (n.d.). Perbandingan Model Decision Tree, Naive Bayes dan Random Forest untuk Prediksi Klasifikasi Penyakit Jantung. JURNAL INFORMATIK Edisi Ke, 18, 2022.

Hambardzumyan, K. (2021). Data Preprocessing in Real-time Education Management System.

Larose, D. T. (2005). Discovering Knowledge In Data. JohnWiley and Sons.

Prabamurti, G. A. (2019). Analisis Faktor-Faktor Pemicu Level Stress Akademik Mahasiswa Kedokteran Universitas Sebelas Maret Surakarta.

Purbolaksono, M. D., Irvan Tantowi, M., Imam Hidayat, A., & Adiwijaya, A. (2021). Perbandingan Support Vector Machine dan Modified Balanced Random Forest dalam Deteksi Pasien Penyakit Diabetes. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 5(2), 393–399. https://doi.org/10.29207/resti.v5i2.3008

Rachakonda, L., Mohanty, S. P., Kougianos, E., & Prabha Sundaravadivel. (2019). Stress-Lysis: A DNN-Integrated Edge Device for Stress Level Detection in the IoMT.

Rahayu, P. W., & dkk. (2024). Buku Ajar Data Mining (Efitra, Ed.). Sonpedia.

Suntoro, J. (2018). Data Mining Algoritme dan Implementasi Menggunaan Bahasa Pemrograman PHP.

Tyas, T. M. M., & Purnamasari, A. I. (2023). Penerapan Algoritma K-means dalam Mengelompokkan Demam Berdarah Dengue Berdasarkan Kabupaten. Blend Sains Jurnal Teknik, 1(4), 277–283. https://doi.org/10.56211/blendsains.v1i4.231

Utomo, D. P., & Mesran, M. (2020). Analisis Komparasi Metode Klasifikasi Data Mining dan Reduksi Atribut Pada Data Set Penyakit Jantung. JURNAL MEDIA INFORMATIKA BUDIDARMA, 4(2), 437. https://doi.org/10.30865/mib.v4i2.2080

Van Fadhila, A., Azzahra, J. A., Rizki, K., Zulkarnain, T., Lathifah, N. D., Salsabiila, S. Z., & Chamidah, N. (2023). Implementasi Metode Machine Learning Untuk Mendeteksi Tingkat Stres Manusia Berdasarkan Kualitas Tidur.

Wibowo, M., Rizieq, M., & Djafar, F. (2023). JURNAL MEDIA INFORMATIKA BUDIDARMA Perbandingan Metode Klasifikasi Untuk Deteksi Stress Pada Mahasiswa di Perguruan Tinggi. https://doi.org/10.30865/mib.v7i1.5182

Wirayudha, V. R., Hidayat, N., & Dewi, R. K. (2020). Identifikasi Tingkat Stress Pada Manusia Menggunakan Metode K-NN (K-Nearest Neighbour) (Vol. 4, Issue 9). http://j-ptiik.ub.ac.id


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Analisis Perbandingan Algoritma K-Nearest Neighbor dan Decision Tree Pada Klasifikasi Tingkat Stress Individu

Dimensions Badge
Article History
Published: 2024-06-30
Abstract View: 194 times
PDF Download: 156 times
Section
Articles