Analisis Variabel K Pada Penerapan Metode K-Nearest Neighbors (K-NN) Untuk Klasifikasi Penyakit Demam Tifoid (Tifus)

Authors

  • Nanda Nur’Azmi Utami Universitas Indo Global Mandiri
  • Rendra Gustriansyah Universitas Indo Global Mandiri
  • Nazori Suhandi Universitas Indo Global Mandiri

DOI:

https://doi.org/10.61231/2bpzph26

Keywords:

Demam Tifoid, K-Nearest Neighbor, Variabel K, Pendekatan Bayesian, Klasifikasi

Abstract

Clinical diagnosis of typhoid fever frequently encounters challenges due to overlapping symptomatic characteristics with other infectious diseases, thereby increasing the risk of misdiagnosis. This study implements the K-Nearest Neighbor (K-NN) algorithm for typhoid fever classification, focusing on optimizing the selection of the K parameter value through a probabilistic Bayesian Likelihood approach. The dataset consists of 203 primary medical records from Dempo Health Center, Palembang, for the 2024–2026 period, with input features comprising fever duration, gastrointestinal symptoms, neurological symptoms, skin manifestations, and Widal test results. Model testing was conducted using a 70:30 data-splitting scheme (142 training data and 61 testing data). Evaluation results from both Bayesian Likelihood and the Elbow Method consistently determined K = 3 as the most optimal nearest-neighbor parameter. The K-NN model with K=3 achieved excellent classification performance, with an Accuracy of 96.72%, a Precision of 100.00%, and a Recall of 89.47%. These results indicate that the model is highly feasible as a clinical decision support system to assist medical personnel in detecting typhoid fever quickly, objectively, and accurately.

References

A. C. Prihandoko, E. Susanto, and W. R., “Evaluasi Model Klasifikasi Machine Learning untuk Diagnosis Penyakit Berbasis Data Rekam Medis,” J. Inform. J. Pengemb. IT, vol. 9, no. 1, pp. 12–19, 2024.

D. Zahra, A. Nurdin, U. Fitria, K. A. Dinen, and R. Kurnia, “Pemanfaatan Teknologi dalam Bidang Kesehatan Masyarakat,” Public Health J., 2021.

E. Fahmi Ginting, M. Hutasuhut, M. Roza Fitri, and S. Triguna Dharma, “Sistem Cerdas Mendiagnosa Penyakit Demam Tifoid dengan Metode Case Based Reasoning,” J. Sci. Soc. Res., 2023.

Erald Giovanny Hasiholan Simatupang et al., “Epidemiologi dan Resistensi Antibiotik Salmonella typhi dan Paratyphi A pada Kasus Demam Tifoid di Jakarta: A Systematic Literature Review,” J. Ilmu Psikol. dan Kesehat., 2023.

Fanny Ramadhani, Andy Satria, and Indah Purnama Sari, “Implementasi Metode Fuzzy K-Nearest Neighbor dalam Klasifikasi Penyakit Demam Berdarah,” Hello World J. Ilmu Komput., vol. 2, no. 2, pp. 58–62, 2023

F. A. Nishat and I. Mahmud, “Enhancing Typhoid Fever Diagnosis Based on Clinical Data Using a Lightweight Machine Learning Metamodel,” vol. 15, no. 5, 2026.

Gustriansyah, R., Alie, J., Sanmorino, A., Heriansyah, R. and Noor, M.M., 2022. Noor (Machine Learning for Regencies-Cities Clustering Based on Inflation and Poverty Rates in Indonesia) Machine Learning for Regencies-Cities Clustering Based on Inflation and Poverty Rates in Indonesia. Indonesian Journal of Information Systems (IJIS), .

Gustriansyah, R., Suhandi, N., Puspasari, S. and Sanmorino, A., 2024. Machine Learning Method to Predict the Toddlers’ Nutritional Status. JURNAL INFOTEL, 16(1). https://doi.org/10.20895/infotel.v15i4.988.

H. Hafid, “Penerapan K-Fold Cross Validation untuk Menganalisis Kinerja Algoritma K-Nearest Neighbor pada Data Kasus Covid-19 di Indonesia,” J. Math., 2023.

H. Wang, X. Z., and W. Pedrycz, “An Overview on the Roles of Fuzzy Set Techniques in Big Data Processing: Trends, Challenges and Opportunities,” Knowledge-Based Syst., pp. 569–589, 2023.

H. Sarker, “Machine Learning: Algorithms, Real-World Applications and Research Directions,” SN Comput. Sci., vol. 2, no. 3, p. 160, 2021.

Ibrahim Akbar, M., Heriansyah, R., Haviz Irfani, M., Indo Global Mandiri, U., Jend Sudirman Km, J., Jurusan Teknik Informatika, P. and Ilmu Komputer Dan Sains, F., 2026. Pengaruh Splitting Data terhadap Akurasi Klasifikasi Demam Berdarah Dengue Menggunakan K-Nearest Neighbors. Jurnal Algoritme, 6(2), pp.244–256. https://doi.org/10.35957/algoritme.v6i2.13274.

I. Fauzi and H. C., “Analisis Kinerja Algoritma K-Nearest Neighbor dalam Klasifikasi Penyakit Liver,” J. Tek. Inform. UNIKA Santo Thomas, vol. 10, no. 2, pp. 357–364, 2025.

J. F. J. Tobing, “Demam Tifoid,” 2024, doi: 10.37817/ikraith-humaniora.v8i2

M. Y. Matdoan, “Penerapan Metode K-Nearest Neighbor untuk Mengklasifikasi Penyebaran Kasus Demam Berdarah Dengue (DBD) di Kabupaten Maluku Tenggara,” Square J. Math. Math. Educ., vol. 4, no. 2, pp. 75–82, 2022, doi: 10.21580/square.2022.4.2.13056.

Nazori Suhandi, Rendra Gustriansyah and Destria, A., 2025. Klasifikasi Penyakit TBC Menggunakan Metode UMAP dan K-NN. bit-Tech, 7(3), pp.843–852. https://doi.org/10.32877/bt.v7i3.2227.

N. M. Tangkelayuk and E. Mailoa, “Evaluasi Performa Model Klasifikasi Menggunakan Confusion Matrix pada Dataset Penyakit,” J. Tek. Inform. dan Sist. Inf., vol. 8, no. 2, pp. 401–410, 2022.

S. Latuconsina and M. Y. Matdoan, “Prediksi Penyebaran Kasus Demam Berdarah Dengue (DBD) Dengan Metode K-Nearest Neighbor di Kabupaten Maluku Tengah,” J. Ilm. Mat. dan Terap., vol. 19, no. 2, pp. 254–261, 2022.

Suhandi, N., Gustriansyah, R., Destria, A., Amalia, M. and Kris, V., 2024. Prediksi Kualitas Susu Menggunakan Metode K-Nearest Neighbors Milk Quality Prediction Using The K-Nearest Neighbors Method. [online] 14(2). https://doi.org/10.30700/sisfotenika.v14i2.430

Downloads

Published

2026-11-17

How to Cite

Analisis Variabel K Pada Penerapan Metode K-Nearest Neighbors (K-NN) Untuk Klasifikasi Penyakit Demam Tifoid (Tifus). (2026). Jurnal Penelitian Dan Pengabdian Masyarakat , 4(4), 3176–3183 . https://doi.org/10.61231/2bpzph26

Similar Articles

11-17 of 17

You may also start an advanced similarity search for this article.