Penerapan Algoritma K-Nearest Neighbors dalam Mengklasifikasi Penyakit Multiple Sclerosis
Keywords:
Multiple Sclerosis, K-Nearest Neighbors, Classification, Machine Learning, Disease DiagnosisAbstract
The central nervous system is impacted by multiple sclerosis (MS), a chronic autoimmune disease that requires early identification for successful treatment. Because of its many symptoms and similarities to other neurological disorders, MS can be difficult to diagnose. Artificial intelligence techniques like the K-Nearest Neighbors (KNN) algorithm can be used to help with quicker and more precise classification in order to solve this problem. The goal of this study is to classify MS using the KNN technique and assess how well it performs in this regard. The Kaggle platform provided the dataset, which consists of 273 patient records with 18 clinical characteristics. With k = 3 as the number of neighbors, the data was split into 80% for training and 20% for testing. The Python programming language was used to implement the classification procedure. According to the findings, the KNN algorithm classified MS with an accuracy of 81.82%. The precision, recall, and f1-score for class 1 were 0.83, 0.76, and 0.79, respectively, according to additional analysis utilizing a classification report, whereas the scores for class 2 were 0.81, 0.87, and 0.84. These findings suggest that the KNN method has the potential to serve as a supportive tool in the diagnosis of Multiple Sclerosis.
References
Ali, A., Alrubei, M. A. T., Hassan, L. F. M., Al-Ja’afari, M. A. M., & Abdulwahed, S. H. (2020). Diabetes Diagnosis Based on KNN. IIUM Engineering Journal, 21(1), 175–181. https://doi.org/10.31436/iiumej.v21i1.1206
Dahl, J. R., Weier, A., Winter, C., Hintze, M., Rothhammer, V., Tsaktanis, T., Proebstel, A. K., Neziraj, T., Poessnecker, E., Oechtering, J., Kuhle, J., Kallmann, B. A., Luber, G., Heider, T., Klotz, L., Chunder, R., & Kuerten, S. (2025). Modulator of VRAC Current 1 Is a Potential Target Antigen in Multiple Sclerosis. Neurology(R) Neuroimmunology & Neuroinflammation, 12(2), e200374. https://doi.org/10.1212/NXI.0000000000200374
Farkhatun Zaidah, & Supatman. (2025). Implementasi Metode K-Nearest Neighbor Dalam Menentukan Klasifikasi Strata Posyandu Di Kabupaten Brebes. JEKIN - Jurnal Teknik Informatika, 5(1), 181–192. https://doi.org/10.58794/jekin.v5i1.1124
Firmansyah, A. A. (2020). Pengembangan Pencarian Produk Terkait Menggunakan Euclidean Distance dan Cosine Similarity Pada Aplikasi Halal Nutrition Food. 1–79.
Firyal Laila Ramadhina, A., Sofian, E., Esq, S., & Jakarta Selatan, C. (2024). Perbandingan Metode K-Nearest Neighbor dan Pohon Keputusan dalam Analisis Sentimen Data Ulasan Aplikasi Pinjaman Online Berizin OJK Di Google Play. VII, 115–124.
Haviluddin, Puspitasari, N., Burhandeny, A. E., Nurulita, A. D. A., & Trahutomo, D. (2022). Naïve Bayes and K-Nearest Neighbor Algorithms Performance Comparison in Diabetes Mellitus Early Diagnosis. International Journal of Online and Biomedical Engineering (IJOE), 18(15), 202–215. https://doi.org/10.3991/ijoe.v18i15.34143
Helme, A., Kalra, D., Brichetto, G., Peryer, G., Vermersch, P., Weiland, H., White, A., & Zaratin, P. (2025). Artificial intelligence and science of patient input: a perspective from people with multiple sclerosis. Frontiers in Immunology, 16(February), 1–6. https://doi.org/10.3389/fimmu.2025.1487709
Jamil, M., Warsito, B., & Wibowo, A. (2023). Diabetes Mellitus Early Detection Simulation using The K‐Nearest Neighbors Algorithm with Cloud‐Based Runtime (COLAB). ILKOM Jurnal Ilmiah, 15(2), 215–221. https://doi.org/10.33096/ilkom.v15i2.1510.215-221
Kiram, M. A., Darnila, E., & Sahputra, I. (2025). Machine Learning Klasifikasi Penyakit Jiwa Menggunakan Metode K-Nearest Neighbor Berbasis Web. 9, 2445–2456.
Mansouri, S., Boulares, S., & Chabchoub, S. (2024). Machine Learning for Early Diabetes Detection and Diagnosis. Journal of Wireless Mobile Networks, Ubiquitous Computing, and Dependable Applications, 15(1), 216–230. https://doi.org/10.58346/JOWUA.2024.I1.015
Pratama, F., Hadryan Nst, Z., Khairi, Z., & Efrizoni, L. (2024). Perbandingan Algoritma Random Forest Dan K-Nearest Neighbor Dalam Klasifikasi Kesehatan Mental Mahasiswa. Jurnal Ilmiah Betrik, 15(1), 31–37.
Sabita, S. A., & Yahfizham, Y. (2024). Penerapan algoritma klasifikasi nearest neighbor dalam mendeteksi penyakit diabetes. Jurnal Bintang Pendidikan Dan Bahasa, 2(1), 149–158.
Silalahi, A. P., & Simanullang, H. G. (2023). Supervised Learning Metode K-Nearest Neighbor Untuk Prediksi Diabetes Pada Wanita. METHOMIKA: Jurnal Manajemen Informatika Dan Komputerisasi Akuntansi, 7(1), 144–149. https://doi.org/10.46880/jmika.Vol7No1.pp144-149
Sipayung, S. M., Yohanna, M., Manullang, H. G., & Mandala, R. (2024). Analisis Sentimen Menggunakan K-Nearest Neighbor Terhadap Film Ngeri-Ngeri Sedap. Jurnal Ilmiah Teknik Informatika, 4(2).
Statsenko, Y., Smetanina, D., Arora, T., Östlundh, L., Habuza, T., Simiyu, G. L., Meribout, S., Talako, T., King, F. C., Makhnevych, I., Gelovani, J. G., Das, K. M., Gorkom, K. N. Van, Almansoori, T. M., Al Zahmi, F., Szólics, M., Ismail, F., & Ljubisavljevic, M. (2023). Multimodal diagnostics in multiple sclerosis: predicting disability and conversion from relapsing-remitting to secondary progressive disease course - protocol for systematic review and meta-analysis. BMJ Open, 13(7), 1–9. https://doi.org/10.1136/bmjopen-2022-068608
Valerian, F. R., Syarief, M., Fatah, D. A., Informasi, S., Madura, U. T., Kamal, K., & Timur, J. (2025). Klasifikasi tingkat obesitas menggunakan metode gbm dan confusion matrix. 9(2), 2242–2249.
Yasin, S. Q. F., & Widodo, A. W. (2025). Klasifikasi Tingkat Obesitas Berdasarkan Pola Hidup dan Kebiasaan Konsumsi Makanan menggunakan meotde K-Nearest Neighbor. Jurnal Pengembangan Teknologi Informasi Dan Ilmu Komputer, 9(3).
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Andrew Efraim Nicholas Sitompul, Margaretha Yohanna, Arina Prima Silalahi

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










