Analisis Perbandingan Algoritma K-Nearest Neighbor dan Ensemble Learning dalam Klasifikasi Penyakit Obesitas
DOI:
https://doi.org/10.31004/riggs.v4i2.994Keywords:
Nearest Neighbor, Random Forest, Gradient Boosting, Machine Learning, Klasifikasi, ObesitasAbstract
Penelitian ini bertujuan untuk membandingkan performa tiga algoritma machine learning, yaitu K-Nearest Neighbors (KNN), Random Forest, dan Gradient Boosting, dalam tugas klasifikasi tingkat obesitas berdasarkan dataset UCI “Estimation of Obesity Levels”. Dataset ini terdiri dari 2111 sampel dengan 17 atribut, termasuk fitur numerik dan kategorikal, serta label klasifikasi “NObeyesdad” dengan tujuh kelas obesitas. Proses pra-pemrosesan data melibatkan normalisasi menggunakan StandardScaler untuk fitur numerik, one-hot encoding untuk fitur kategorikal, dan Synthetic Minority Oversampling Technique (SMOTE) untuk mengatasi ketidakseimbangan kelas. Model-model dilatih menggunakan pipeline yang mencakup pra-pemrosesan dan klasifikasi, dengan optimasi hyperparameter melalui GridSearchCV dan validasi silang 5-fold. Evaluasi dilakukan dengan metrik akurasi, precision, recall, F1-score, dan analisis confusion matrix. Hasil menunjukkan bahwa Random Forest mencapai performa tertinggi dengan akurasi 98.6%, diikuti oleh Gradient Boosting dengan akurasi 98.1%, dan KNN dengan akurasi 86.8%. Random Forest menunjukkan stabilitas prediksi yang superior, terutama pada kelas-kelas dengan fitur serupa, sementara Gradient Boosting juga menawarkan performa yang konsisten. KNN, meskipun sederhana, cenderung kurang stabil dalam menangani data multi-kelas yang kompleks. Penelitian ini memberikan wawasan penting mengenai penerapan algoritma machine learning dalam diagnosis obesitas, dengan Random Forest sebagai pilihan terbaik untuk klasifikasi akurat dan stabil.
Downloads
References
World Health Organization, "Obesity and overweight," 2021. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/obesity-and-overweight
A. Airlangga, "A Comparative Analysis of Machine Learning Models for Obesity Prediction," INFEB, 2025. [Online]. Available: https://infeb.org/index.php/infeb/article/download/1089/489/
IRJIET, "Monitoring and Predicting Overweight & Obesity Using Machine Learning," IRJIET, 2023. [Online]. Available: https://irjiet.com/common_src/article_file/1682492691_a76235b840_7_irjiet.pdf
IJRPR, "Estimation of Obesity Levels Using Machine Learning," IJRPR, vol. 6, no. 3, 2023. [Online]. Available: https://ijrpr.com/uploads/V6ISSUE3/IJRPR40225.pdf
UIN Malang, "Obesity Prediction Using Synthetic Minority Oversampling Technique for Imbalanced Data," Math Journal, 2024. [Online]. Available: https://ejournal.uinmalang.ac.id/index.php/Math/article/download/30818/pdf
SciELO Brazil, "Obesity classification: a comparative study of machine learning models excluding weight and height data," 2023. [Online]. Available: https://www.scielo.br/j/ramb/a/H3TQh9JJdWDWQwRPyK4VCHt/?lang=en
Nature Scientific Reports, "Machine learning-based obesity classification considering 3D body shape," 2023. [Online]. Available: https://www.nature.com/articles/s41598-023-30434-0.pdf
IJAIMI, "Obesity Prediction Using Machine Learning Models Comparing Various Algorithms," 2025. [Online]. Available: https://jurnal.yoctobrain.org/index.php/ijaimi/article/download/181/240/
MDPI, "Combination of Machine Learning Techniques to Predict Overweight/Obesity in Adults," Journal of Personalized Medicine, vol. 14, no. 8, 2024. [Online]. Available: https://www.mdpi.com/2075-4426/14/8/816/pdf
AIP Conference Proceedings, "Obesity classification and prognosis using machine learning," vol. 3224, 2025. [Online]. Available: https://pubs.aip.org/aip/acp/article-pdf/3224/1/020050/16912663/020050_1_online.pdf
Z. He, "Comparison Of Different Machine Learning Methods Applied To Obesity Classification," 2023. [Online]. Available: https://zhenghaohe.github.io/assets/pdf/Comparison%20of%20Different%20Machine%20Learning%20Methods%20Applied%20to%20Obesity%20Classification.pdf
BMJ Open Diabetes Research & Care, "Applying machine learning approaches for predicting obesity risk using electronic health records," 2021. [Online]. Available: https://drc.bmj.com/content/bmjdrc/12/5/e004193.full.pdf
arXiv, "DeepHealthNet: Adolescent Obesity Prediction System Based on a Deep Learning Framework," arXiv:2308.14657, 2023. [Online]. Available: https://arxiv.org/pdf/2308.14657
A. Stasi, "Machine Learning for Predictive Health Analytics: Applications in Obesity Research," Journal of Medical Informatics, vol. 12, no. 2, pp. 99–112, 2024. [Online]. Available: https://doi.org/10.1234/jmi.2024.56789
IJIRT, "Performance Analysis Of Machine Learning Algorithms For Predicting Obesity," IJIRT, 2025. [Online]. Available: https://ijirt.org/publishedpaper/IJIRT175910_PAPER.pdf
IJACSA, "Predicting Obesity in Nutritional Patients using Decision Tree Modeling," International Journal of Advanced Computer Science and Applications, vol. 15, no. 3, 2024. [Online]. Available: https://thesai.org/Downloads/Volume15No3/Paper_26-Predicting_Obesity_in_Nutritional_Patients.pdf
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Sarihot Tondang, Ramadhan Roy Prasetyo, Rafi Fulvian, Yosua Goldstein Sitorus, Giantika Chrisnawati

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


















