Analisa Perbandingan Algorithma K-Nearest Neighbors dan Random Forest untuk Klasifikasi Tindakan Medis Persalinan pada Data Kehamilan Multi-Variabel


Authors

  • Alfin Mahadi Universitas Amikom Yogyakarta, Sleman, Indonesia
  • Ema Utami Universitas Amikom Yogyakarta, Sleman, Indonesia

DOI:

https://doi.org/10.47065/bulletincsr.v5i4.556

Keywords:

K-Nearest Neighbors; Random Forest; Particle Swarm Optimization; Multi-Variable; Medical Classification

Abstract

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

Download data is not yet available.

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

Dimensions Badge

ARTICLE HISTORY

Published: 2025-06-10

Abstract View: 18 times
PDF Download: 17 times

How to Cite

Alfin Mahadi, & Ema Utami. (2025). Analisa Perbandingan Algorithma K-Nearest Neighbors dan Random Forest untuk Klasifikasi Tindakan Medis Persalinan pada Data Kehamilan Multi-Variabel . Bulletin of Computer Science Research, 5(4), 424-433. https://doi.org/10.47065/bulletincsr.v5i4.556

Issue

Section

Articles