Perbandingan Algoritma Decision Tree dan K-Nearest Neighbor untuk Klasifikasi Penyakit ISPA

  • Marchell William Putra Pakpahan Universitas Prima Indonesia
  • Bayu Angga Wijaya Universitas Prima Indonesia
  • Marsaulina Lumbantoruan Universitas Prima Indonesia
  • Ambarsius Samosir Universitas Prima Indonesia
  • Mikhael Rafael Universitas Prima Indonesia
Keywords: ARI, Decision Tree, K-Nearest Neighbor, Classification, Machine Learning

Abstract

Acute Respiratory Infection (ARI) is one of the most common respiratory diseases with diverse and overlapping clinical symptoms, making initial identification challenging and necessitating a systematic, data-driven classification approach. This study aims to compare the performance of the Decision Tree and K-Nearest Neighbor (KNN) algorithms in classifying ARI-related disease categories. The novelty of this research lies in the specific construction of ARI labels into five distinct categories from the Pediatric Respiratory Infections dataset, coupled with a rigorous feature selection process to handle mixed data types and address class imbalance using weighted evaluation metrics. The dataset consisted of 801 patient records with 91 initial attributes. The classification label was constructed from the Main diagnostic column and grouped into five categories: Asthma/Bronchospasm/Wheezing, Pneumonia/Pneumopathy, Bronchiolitis, Laryngeal/Upper Respiratory, and Other. After feature selection to remove noise and redundancy, 54 features were used, consisting of 24 numerical and 30 categorical features. The research stages included preprocessing, label construction, missing value handling, categorical encoding, KNN normalization, 80:20 train-test splitting, and model evaluation. The results show that Decision Tree achieved higher performance with 67.08% accuracy and 69.12% weighted F1-score, while KNN achieved 65.84% accuracy and 64.18% weighted F1-score. Thus, Decision Tree demonstrates superior performance and interpretability for this specific dataset.

Downloads

Download data is not yet available.

References

N. Nigar, A. Jaleel, S. Islam, M. K. Shahzad, and E. A. Affum, "IoMT Meets Machine Learning: From Edge to Cloud Chronic Diseases Diagnosis System," Journal of Healthcare Engineering, vol. 2023, 2023.

A. S. Alatrany, W. Khan, A. Hussain, H. Kolivand, and D. Al-Jumeily, "An explainable machine learning approach for Alzheimer's disease classification," Scientific Reports, vol. 14, no. 1, pp. 1-18, 2024.

W. P. Hanage and W. Schaffner, "Burden of Acute Respiratory Infections Caused by Influenza Virus, Respiratory Syncytial Virus, and SARS-CoV-2 with Consideration of Older Adults: A Narrative Review," Infectious Diseases and Therapy, vol. 14, pp. 5-37, 2025.

J. M. Caldwell, C. M. Espinosa, R. Banerjee, and J. B. Domachowske, "Rapid diagnosis of acute pediatric respiratory infections with Point-of-Care and multiplex molecular testing," Infection, vol. 53, Suppl. 1, pp. 1-15, 2025.

S. Gongora Alonso, G. Marques, D. Agarwal, I. De la Torre Diez, and M. Franco-Martin, "Comparison of Machine Learning Algorithms in the Prediction of Hospitalized Patients with Schizophrenia," Sensors, vol. 22, no. 7, 2022.

M. Bansal, A. Goyal, and A. Choudhary, "A comparative analysis of K-Nearest Neighbor, Genetic, Support Vector Machine, Decision Tree, and Long Short Term Memory algorithms in machine learning," Decision Analytics Journal, vol. 3, 2022.

A. Y. Yildiz and A. Kalayci, "Gradient Boosting Decision Trees on Medical Diagnosis Over Tabular Data," in 2025 IEEE Conference on AI and Data Analytics (ICAD), 2025.

T. T. Tuyen et al., "Prediction of white spot disease susceptibility in shrimps using decision trees based machine learning models," Applied Water Science, vol. 14, no. 1, pp. 1-15, 2024.

S. Uddin, I. Haque, H. Lu, M. A. Moni, and E. Gide, "Comparative performance analysis of K-nearest neighbour (KNN) algorithm and its different variants for disease prediction," Scientific Reports, vol. 12, no. 1, pp. 1-11, 2022.

B. Sun and H. Chen, "A Survey of k Nearest Neighbor Algorithms for Solving the Class Imbalanced Problem," Wireless Communications and Mobile Computing, vol. 2021, 2021.

B. J. Chadha and R. Singh, "A Comparative Analysis of Decision Tree, K-Nearest Neighbors and Naive Bayes Algorithms for Classification Tasks," vol. 14, no. 04, pp. 2-5, 2025.

J. E. Simarmata, G. W. Weber, and D. Chrisinta, "Performance Evaluation of Classification Methods on Big Data: Decision Trees, Naive Bayes, K-Nearest Neighbors, and Support Vector Machines," Journal of Mathematics, Statistics and Computing, vol. 20, no. 3, pp. 623-638, 2024.

R. Islam, A. Sultana, and M. R. Islam, "A comprehensive review for chronic disease prediction using machine learning algorithms," Journal of Electrical Systems and Information Technology, vol. 11, no. 27, 2024, doi: 10.1186/s43067-024-00150-4.

M. A. Khan et al., "Optimal feature selection for heart disease prediction using modified Artificial Bee colony (M-ABC) and K-nearest neighbors (KNN)," Scientific Reports, vol. 14, no. 26241, 2024, doi: 10.1038/s41598-024-78021-1.

F. Asadi, R. Homayounfar, Y. Mehrali, C. Masci, S. Talebi, and F. Zayeri, "Detection of cardiovascular disease cases using advanced tree-based machine learning algorithms," Scientific Reports, vol. 14, no. 22230, 2024, doi: 10.1038/s41598-024-72819-9.

S. Srinivasan et al., "Detection of Parkinson disease using multiclass machine learning approach," Scientific Reports, vol. 14, no. 13813, 2024, doi: 10.1038/s41598-024-64004-9.

M. Nandagopal et al., "A Deep Auto-Optimized Collaborative Learning (DACL) model for disease prognosis using AI-IoMT systems," Scientific Reports, vol. 14, no. 10280, 2024, doi: 10.1038/s41598-024-59846-2.

A. Altamimi et al., "An automated approach to predict diabetic patients using KNN imputation and effective data mining techniques," BMC Medical Research Methodology, vol. 24, no. 221, 2024, doi: 10.1186/s12874-024-02324-0.

S. Hossain et al., "Machine learning approach for predicting cardiovascular disease in Bangladesh: evidence from a cross-sectional study in 2023," BMC Cardiovascular Disorders, vol. 24, no. 214, 2024, doi: 10.1186/s12872-024-03883-2.

P. Chakraborty et al., "Predicting stroke occurrences: a stacked machine learning approach with feature selection and data preprocessing," BMC Bioinformatics, vol. 25, no. 329, 2024, doi: 10.1186/s12859-024-05866-8.

Published
2026-06-12
How to Cite
Pakpahan, M. W. P., Wijaya, B. A., Lumbantoruan, M., Samosir, A., & Rafael, M. (2026). Perbandingan Algoritma Decision Tree dan K-Nearest Neighbor untuk Klasifikasi Penyakit ISPA. BIOS : Jurnal Teknologi Informasi Dan Rekayasa Komputer, 7(2), 111-117. https://doi.org/10.37148/bios.v7i2.215