Performance Analysis of K-Nearest Neighbors and Naive Bayes Algorithms in Stunting Risk Classification in Toddlers Using Public Dataset

Authors

  • Nurhikmayani Uniqhba
  • Syahrani Lonang Universitas Qamarul Huda Badaruddin Bagu
  • Ahmad Fatoni Dwi Putra Universitas Qamarul Huda Badaruddin Bagu

DOI:

https://doi.org/10.37824/sij.v9i1.2026.1354

Keywords:

Stunting, Machine Learning, K-Nearest Neighbors, Naïve Bayes, Classification

Abstract

Stunting is a chronic nutritional problem in toddlers that can affect physical growth, cognitive development, and children's health quality in the future. This study aims to analyze and compare the performance of the K-Nearest Neighbors (KNN) and Naïve Bayes algorithms in classifying stunting risk in toddlers using a public dataset from Kaggle. The research was conducted through several stages, including data preprocessing, data cleaning, normalization using the Min-Max method, data balancing using SMOTE-ENN, splitting training and testing data, and parameter optimization using Grid Search. Model evaluation was carried out using a Confusion Matrix with accuracy, precision, Recall, F1-score, ROC Curve, and AUC Score metrics. The results showed that the KNN algorithm performed better than the Naïve Bayes algorithm in classifying stunting risk. The KNN algorithm produced higher accuracy, precision, Recall, and F1-score values, as well as more optimal ROC-AUC values for each classification class. Based on these evaluation results, the KNN algorithm was considered more effective and stable in detecting stunting risk in toddlers compared to the Naïve Bayes algorithm. Therefore, the KNN algorithm can be used as an effective method to support early stunting risk detection based on Machine Learning.

References

[1] U. Malikussaleh, “SENASTIKA Universitas Malikussaleh,” pp. 1–6, 2024.

[2] V. No, N. R. Febriyanti, and A. D. Hartanto, “Edumatic : Jurnal Pendidikan Informatika Analisis Perbandingan Algoritma SVM , Random Forest dan Logistic Regression untuk Prediksi Stunting Balita,” vol. 9, no. 1, pp. 149–158, 2025, doi: 10.29408/edumatic.v9i1.29407.

[3] R. H. Prayetno, R. D. Purba, K. Wirawan, and K. Sweet, “Purchasing Prediction Using Machine Learning Algorithms for Optimizing Inventory Management,” vol. 11, no. 1, pp. 150–168, 2025, doi: https://doi.org/10.37012/jtik.v11i1.2522.

[4] D. Fitria, R. R. Suryono, C. Science, and U. T. Indonesia, “CLASSIFICATION OF PUBLIC SENTIMENT TOWARDS STUNTING PREVENTION PROGRAM USING NAÏVE BAYES AND SUPPORT VECTOR MACHINE ON X APPLICATION KLASIFIKASI SENTIMEN PUBLIK TERHADAP PROGRAM PENCEGAHAN STUNTING MENGGUNAKAN NAÏVE BAYES DAN SUPPORT VECTOR MACHINE,” vol. 5, no. 6, pp. 1839–1847, 2024.

[5] D. Nasien et al., “Perbandingan Implementasi Machine Learning Menggunakan Metode KNN , Naive Bayes , Dan Logistik Regression Untuk Mengklasifikasi Penyakit Diabetes,” vol. 4, no. 1, 2024.

[6] U. R. Gurning, S. F. Octavia, D. R. Andriyani, N. Nurainun, and I. Permana, “Prediksi Risiko Stunting pada Keluarga Menggunakan Naïve Bayes Classifier dan Chi-Square,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 1, pp. 172–180, 2024, doi: 10.57152/malcom.v4i1.1074.

[7] A. D. Putri, F. Sholekhah, and E. Dadynata, “The Application of C4 . 5 Decision Tree Algorithm for Predicting the Survival Rate of Thyroid Cancer Patients Penerapan Algoritma Decesion Tree C4 . 5 untuk Memprediksi Tingkat Kelangsungan Hidup Pasien Kanker Tiroid,” vol. 4, no. October, pp. 1485–1495, 2024.

[8] B. Alareeni and I. Elgedawy, Indonesia’s Path to Sustainability: Exploring the Intersections of Ecological Footprint, Technology, Global Trade, Financial Development and Renewable Energy Asif, vol. 1. 2024.

[9] L. Shen, Y. Sun, Z. Yu, L. Ding, X. Tian, and D. Tao, “On Efficient Training of Large-Scale Deep Learning Models,” ACM Comput. Surv., vol. 57, no. 3, pp. 1–60, 2024, doi: 10.1145/3700439.

[10] E. Sahelvi, P. Cikita, and R. M. Sapitri, “Comparison of K-Nearest Neighbors and Random Forest Algorithms for Recommendations for a Healthy Lifestyle in Prevent Heart Disease Perbandingan Algoritma K-Nearest Neighbors dan Random Forest untuk Rekomendasi Gaya Hidup Sehat dalam Mencegah Penyakit Jan,” vol. 5, no. July, pp. 830–840, 2025.

[11] S. Rahmi, A. Rachman, and R. Puspitasari, “K-Nearest Neighbor dengan Jarak Euclidean , Manhattan , dan Minkowski pada klasifikasi sampah,” vol. 2, no. 3, pp. 294–301, 2025.

[12] P. P. Allorerung, A. Erna, M. Bagussahrir, and S. Alam, “Analisis Performa Normalisasi Data untuk Klasifikasi K-Nearest Neighbor pada Dataset Penyakit,” JISKA (Jurnal Inform. Sunan Kalijaga), vol. 9, no. 3, pp. 178–191, 2024, doi: 10.14421/jiska.2024.9.3.178-191.

[13] M. F. A. Ad-duali, D. P. Adinata, T. Informatika, F. Teknik, U. Nusantara, and P. Kediri, “Komparasi Algoritma Naive Bayes dan Random Forest untuk Identifikasi Kata Berpotensi Spam,” vol. 5, pp. 439–448, 2026.

[14] W. Nugraha and A. Sasongko, “Hyperparameter Tuning pada Algoritma Klasifikasi dengan Grid Search Hyperparameter Tuning on Classification Algorithm with Grid Search,” Sist. J. Sist. Inf., vol. 11, no. 2, pp. 2540–9719, 2022, [Online]. Available: https://doi.org/10.32520/stmsi.v11i2.1750

[15] R. Merdiansah and A. A. Ridha, “Analisis Sentimen Pengguna X Indonesia Terkait Kendaraan Listrik Menggunakan IndoBERT,” vol. 7, pp. 221–228, 2024.

[16] K. Kristiawan and A. Widjaja, “Perbandingan Algoritma Machine Learning dalam Menilai Sebuah Lokasi Toko Ritel,” J. Tek. Inform. dan Sist. Inf., vol. 7, no. 1, pp. 35–46, 2021, doi: 10.28932/jutisi.v7i1.3182.

[17] D. Chicco and G. Jurman, “The Matthews correlation coefficient (MCC) should replace the ROC AUC as the standard metric for assessing binary classification,” BioData Min., vol. 16, no. 1, pp. 1–23, 2023, doi: 10.1186/s13040-023-00322-4.

Downloads

Published

2026-07-31

How to Cite

[1]
“Performance Analysis of K-Nearest Neighbors and Naive Bayes Algorithms in Stunting Risk Classification in Toddlers Using Public Dataset”, SainsTech Innovation j., vol. 9, no. 1, pp. 612–620, Jul. 2026, doi: 10.37824/sij.v9i1.2026.1354.

Similar Articles

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

Most read articles by the same author(s)