Predict Diagnosis of ME/CFS and Depression Using K-Nearest Neighbor Classification Method
DOI:
https://doi.org/10.59934/jaiea.v5i1.1431Keywords:
Classification, Depression, Diagnosis Prediction, K-Nearest Neighbor, ME/CFS, Mental HealthAbstract
Myalgic Encephalomyelitis/Chronic Fatigue Syndrome (ME/CFS) and depression are two medical conditions that often present with overlapping symptoms, making accurate diagnosis difficult, especially in early stages. This study aims to develop a predictive application using the K-Nearest Neighbor (K-NN) classification algorithm to differentiate between ME/CFS and depression based on clinical and lifestyle-related features. A dataset consisting of 1,000 records and 16 attributes was obtained from a public repository. Preprocessing steps included label encoding for categorical features, mean and mode imputation for missing values, and Min-Max normalization for numerical features. The model was trained using 80% of the data and evaluated on the remaining 20% using Manhattan distance and a k-value of 10. The application was developed with an interactive user interface, enabling predictions based on user input. The model achieved an overall accuracy of 88.5%, with excellent performance in detecting depression and ME/CFS, but moderate performance in identifying comorbid cases. The findings suggest that K-NN can be effectively utilized to support differential diagnosis in mental health, particularly for conditions with overlapping clinical symptoms. Future enhancements may include the incorporation of additional features and algorithmic improvements to address limitations in comorbid case detection.
Downloads
References
A. Pamungkas, R. R. Isnanto, and D. M. K. Nugraheni, “Implementation of K-Nearest Neighbor in Case-Based Reasoning for Mental Health Diagnosis Systems,” Scientific Journal of Informatics, vol. 11, no. 4, pp. 1109–1120, 2024.
N. Nurdiansyah, F. S. Febriyan, Z. G. D. Amanta, D. A. Saputra, and W. M. Baihaqi, “Analisis Kesehatan Mental untuk Mencegah Gangguan Mental pada Mahasiswa Menggunakan Algoritma K-Nearest Neighbor (K-NN) dan Random Forest: Mental Health Analysis to Prevent Mental Disorders in Students Using The K-Nearest Neighbor (K-NN) Algorithm and Random Forest Algorithm,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 5, no. 1, pp. 1–9, 2025.
Y. Rahma, A. Prasetiadi, and M. Wibowo, “Identification Of Mental Ilness From Patient Diseases Using Knn And Levenshtein Distance Algorithm,” Jurnal Teknik Informatika (Jutif), vol. 3, no. 5, pp. 1363–1372, 2022.
A. Hendra, B. R. Heryanti, and A. L. Perdani, “Gambaran Tingkat Depresi, Kecemasan dan Stress pada Mahasiswa Junior Keperawatan di Indonesia,” Jurnal Keperawatan Komprehensif (Comprehensive Nursing Journal), vol. 6, no. 2, pp. 95–100, 2020.
A. H. Azizah, S. Warsini, and K. P. Yuliandari, “Hubungan stres akademik dengan kecenderungan depresi mahasiswa ilmu keperawatan universitas gadjah mada pada masa transisi pandemi covid-19,” Jurnal Keperawatan Klinis Dan Komunitas (Clinical and Community Nursing Journal), vol. 7, no. 2, pp. 114–123, 2023.
A. Agustiyar, “Prediksi Penyakit Jantung Menggunakan Attribute Weighting k-Nearest Neighbor,” InComTech : Jurnal Telekomunikasi dan Komputer, vol. 13, no. 2, p. 145, Aug. 2023, doi: 10.22441/incomtech.v13i2.17883.
Y. T. A. Rinaldy, A. A. Soebroto, and C. A. Setianto, “Sistem Pendukung Keputusan Diagnosis Penyakit Stroke menggunakan Metode Fuzzy K-Nearest Neighbor (FK-NN)(Studi Kasus Puskesmas Kendal Kerep Kota Malang),” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 5, no. 7, pp. 3149–3152, 2021.
T. Praningki and I. Budi, “Sistem Prediksi Penyakit Kanker Serviks Menggunakan CART, Naive Bayes, dan k-NN,” Creative Information Technology Journal, vol. 4, no. 2, pp. 83–93, 2018.
A. K. Wardhani, L. Lakhmudien, A. N. Putri, and S. F. S. Ashour, “An Improved K-NN Algorithm and Bagging for Liver Disease Classification,” Telematika, vol. 15, no. 2, pp. 100–107, 2022.
S. Anisa, A. Komarudin, and E. Ramadhan, “Sistem Klasifikasi untuk Menentukan Tingkat Stress Mahasiswa Secara Umum Menggunakan Metode K-Nearest Neighbors,” Jurnal Informatika Teknologi dan Sains (Jinteks), vol. 6, no. 3, pp. 568–578, 2024.
Arshad Aliyev, “ME/CFS vs Depression Classification Dataset.” Accessed: Aug. 05, 2025. [Online]. Available: https://www.kaggle.com/datasets/storytellerman/mecfs-vs-depression-classification-dataset
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.







