Analisa Perbandingan Algorithma K-Nearest Neighbors dan Random Forest untuk Klasifikasi Tindakan Medis Persalinan pada Data Kehamilan Multi-Variabel
DOI:
https://doi.org/10.47065/bulletincsr.v5i4.556Keywords:
K-Nearest Neighbors; Random Forest; Particle Swarm Optimization; Multi-Variable; Medical ClassificationAbstract
Maternal mortality rate is still high in the most critical aspect affecting the quality of life of mothers and newborns. Very significant urgency considering the importance of proper medical in childbirth procedures. Kendal Islamic Hospital provides more complex data on maternal medical records of childbirth. Many optimization algorithms in classification have been proposed. Many swarm optimizations have been developed, particle swarm optimization is a superior optimization method. Comparison of K-Nearst Neighbors and Random Forest methods is often applied without optimization. This study compares the performance of the K-Nearest Neighbors (KNN) and Random Forest (RF) algorithms in classifying medical procedures for childbirth using medical records of maternity patients at RSI Kendal. The multivariable dataset includes age, weight, height, and more complete childbirth conditions. The preprocessing method involves imputation of empty values ??with KNN imputer, data normalization, and class oversampling using Synthetic Minority Over-sampling Technique (SMOTE). KNN and RF are optimized using Particle Swarm Optimization (PSO) to improve model accuracy. The results show that RF with an accuracy of 99.72% outperforms KNN with an accuracy of 97.03%. In the minority class, RF shows superiority with precision, recall, and F1-score reaching 100%, while KNN is more prone to errors in the minority class. This study confirms RF in handling complex multivariate data and highlights the importance of model optimization to improve accuracy in the classification of medical labor actions. These findings are expected to contribute to the development of machine learning-based decision support systems in the health sector.
Downloads
References
I. Handriani, W. Anasari, and L. O. L. Azim, “Pengaruh Faktor Intra Personal Terhadap Pelayanan Kesehatan Ibu,” J. Kesehat. Saintika Meditory, vol. 6, no. 1, pp. 51–57, 2022, [Online]. Available: https://jurnal.syedzasaintika.ac.id.
D. P. Sinambela, H. Naparin, M. Zulfadhilah, and N. Hidayah, “Implementasi Algoritma Decision Tree dan Random Forest dalam Prediksi Perdarahan Pascasalin,” J. Inf. dan Teknol., vol. 5, no. 3, pp. 58–64, 2023, doi: 10.60083/jidt.v5i3.393.
T. W?odarczyk et al., “Machine learning methods for preterm birth prediction: A review,” Electron., vol. 10, no. 5, pp. 1–24, 2021, doi: 10.3390/electronics10050586.
C. Orovas et al., “Neural Networks for Early Diagnosis of Postpartum PTSD in Women after Cesarean Section,” Appl. Sci., vol. 12, no. 15, pp. 1–15, 2022, doi: 10.3390/app12157492.
T. Wu, H. Fan, H. Zhu, C. You, H. Zhou, and X. Huang, “Intrusion detection system combined enhanced random forest with SMOTE algorithm,” EURASIP J. Adv. Signal Process., vol. 2022, no. 1, 2022, doi: 10.1186/s13634-022-00871-6.
A. Altamimi et al., “An automated approach to predict diabetic patients using KNN imputation and effective data mining techniques,” BMC Med. Res. Methodol., vol. 24, no. 1, p. 221, 2024, doi: 10.1186/s12874-024-02324-0.
E. Erlin, Y. Desnelita, N. Nasution, L. Suryati, and F. Zoromi, “Dampak SMOTE terhadap Kinerja Random Forest Classifier berdasarkan Data Tidak seimbang,” MATRIK J. Manajemen, Tek. Inform. dan Rekayasa Komput., vol. 21, no. 3, pp. 677–690, 2022, doi: 10.30812/matrik.v21i3.1726.
Z. Ullah, F. Saleem, M. Jamjoom, and B. Fakieh, “Reliable prediction models based on enriched data for identifying the mode of childbirth by using machine learning methods: Development study,” J. Med. Internet Res., vol. 23, no. 6, pp. 1–12, 2021, doi: 10.2196/28856.
L. B. V. de Amorim, G. D. C. Cavalcanti, and R. M. O. Cruz, “The choice of scaling technique matters for classification performance,” Appl. Soft Comput., vol. 133, pp. 1–37, 2023, doi: 10.1016/j.asoc.2022.109924.
M. Pal and S. Parija, “Prediction of Heart Diseases using Random Forest,” J. Phys. Conf. Ser., vol. 1817, no. 1, 2021, doi: 10.1088/1742-6596/1817/1/012009.
G. W. Jeon, Y. S. Lee, W. H. Hahn, and Y. H. Jun, “A Predictive Model for Perinatal Brain Injury Using Machine Learning Based on Early Birth Data,” Children, vol. 11, no. 11, 2024, doi: 10.3390/children11111313.
R. A. Kamel et al., “Predicting cesarean delivery for failure to progress as an outcome of labor induction in term singleton pregnancy,” Am. J. Obstet. Gynecol., vol. 224, no. 6, pp. 609.e1-609.e11, 2021, doi: 10.1016/j.ajog.2020.12.1212.
I. Santoso, Windu Gata, and Atik Budi Paryanti, “Penggunaan Feature Selection di Algoritma Support Vector Machine untuk Sentimen Analisis Komisi Pemilihan Umum,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 3, no. 3, pp. 364–370, 2019, doi: 10.29207/resti.v3i3.1084.
S. Nuraeni, S. P. A. Syam, M. F. Wajdi, B. Firmansyah, and M. Malkan, “Implementasi Metode K-NN Untuk Menentukan Jurusan Siswa di SMAN 02 Manokwari,” G-Tech J. Teknol. Terap., vol. 7, no. 1, pp. 89–95, 2023, doi: 10.33379/gtech.v7i1.1905.
M. Lipschuetz et al., “Prediction of vaginal birth after cesarean deliveries using machine learning,” Am. J. Obstet. Gynecol., vol. 222, no. 6, pp. 613.e1-613.e12, 2020, doi: 10.1016/j.ajog.2019.12.267.
D. M. U. Atmaja, A. R. Hakim, A. Basri, and A. Ariyanto, “Klasifikasi Metode Persalinan pada Ibu Hamil Menggunakan Algoritma Random Forest Berbasis Mobile,” JRST (Jurnal Ris. Sains dan Teknol., vol. 7, no. 2, p. 161, 2023, doi: 10.30595/jrst.v7i2.16705.
J. Qiao et al., “A hybrid particle swarm optimization algorithm for solving engineering problem,” Sci. Rep., vol. 14, no. 1, pp. 1–30, 2024, doi: 10.1038/s41598-024-59034-2.
L. Pedersen, M. Mazur-Milecka, J. Ruminski, and S. Wagner, “A Review on Machine Learning Deployment Patterns and Key Features in the Prediction of Preeclampsia,” Mach. Learn. Knowl. Extr., vol. 6, no. 4, pp. 2515–2569, 2024, doi: 10.3390/make6040123.
I. Nazli, E. Korbeko, S. Dogru, E. Kugu, and O. K. Sahingoz, “Early Detection of Fetal Health Conditions Using Machine Learning for Classifying Imbalanced Cardiotocographic Data,” Diagnostics, vol. 15, no. 10, pp. 1–26, 2025, doi: 10.3390/diagnostics15101250.
J. H. Wie et al., “Prediction of Emergency Cesarean Section Using Machine Learning Methods: Development and External Validation of a Nationwide Multicenter Dataset in Republic of Korea,” Life, vol. 12, no. 4, 2022, doi: 10.3390/life12040604.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Analisa Perbandingan Algorithma K-Nearest Neighbors dan Random Forest untuk Klasifikasi Tindakan Medis Persalinan pada Data Kehamilan Multi-Variabel
ARTICLE HISTORY
How to Cite
Issue
Section
Copyright (c) 2025 Alfin Mahadi, Ema Utami

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).