Analisis Perbandingan Algoritma KNN dan SVM untuk Prediksi Risiko Kesehatan Ibu Hamil
Keywords:
K-Nearest Neighbour, Support Vector Machine, Health Risk Prediction, Machine Learning, Patient DataAbstract
In this study, we compared the performance of the K-Nearest Neighbor (KNN) and Support Vector Machine (SVM) algorithms for predicting pregnancy risk in patients. The dataset used consisted of eight variables, such as number of pregnancies, vaccination status, blood pressure, fetal heart rate, body mass index (BMI), age, and height, which were used to classify pregnancies as high-risk or low-risk. Data preprocessing was performed by standardizing numerical features and dividing the data using a stratified split method (80% training data, 20% test data). Model evaluation results showed that KNN achieved an accuracy rate of 81%, while SVM achieved an accuracy of 75.50%. Further analysis showed that KNN was more stable in classifying data with diverse variable distributions, while SVM showed a tendency to be more sensitive to high-risk cases, with 66.7% of predictions pointing to that category. Compared with previous studies, KNN's performance was within the general accuracy range of 70–95%, while SVM's accuracy was slightly lower than the average of similar studies, which reached around 80.33%. This study concludes that both algorithms have the potential to be tools for early detection of maternal health risks, where the differences in their performance are influenced by the selected parameters, data characteristics, and class division.
References
Ahad, A., Puspitasari, I., Zheng, J., Ullah, S., Ullah, F., Mohammad, P., Bakhsh, S. T., & Pires, I. M. (2025). Machine Learning Stroke Prediction in Smart Healthcare: Integrating Fuzzy K-Nearest Neighbor and Artificial Neural Networks with Feature Selection Techniques. Computers, Materials & Continua, 1–20. https://doi.org/10.32604/cmc.2025.062605
Al Hakim, R. R. (2022). Partisipan dan Etika Penelitian. In D. Ediana (Ed.), Metodologi Riset Bidang Sistem Informasi dan Komputer (pp. 13–22). PT. Global Eksekutif Teknologi.
Al-Hakim, R. R., Ardianto, R., Wirasto, A., & Prokopchuk, Y. (2024). How Can IPMA Analysis Through PLS-SEM Identify Maternal Health Risk Factors? Menara Journal of Health Science, 3(3), 428–443. https://jurnal.iakmikudus.org/article/view/202
Al-Hakim, R. R., & Prokopchuk, Y. (2024). Predicting Internal Diseases in Humans Using Machine Learning: A Systematic Literature Review. Journal of Advanced Health Informatics Research (JAHIR), 2(1), 50–63. https://doi.org/10.59247/jahir.v2i1.195
Alnowaiser, K. (2024). Improving Healthcare Prediction of Diabetic Patients Using KNN Imputed Features and Tri-Ensemble Model. IEEE Access, 12, 16783–16793. https://doi.org/10.1109/ACCESS.2024.3359760
Chen, P. H. C., Liu, Y., & Peng, L. (2019). How to develop machine learning models for healthcare. Nature Materials, 18(5), 410–414. https://doi.org/10.1038/S41563-019-0345-0
Harmanto, S. (2022). Pengantar Kecerdasan Artifisial (2nd ed.). Penerbit Gunadarma.
Indriyanti, Sugianti, D., & Karomi, M. A. Al. (2017). Peningkatan Akurasi Algoritma KNN dengan Seleksi Fitur Gain Ratio untuk Klasifikasi Penyakit Diabetes Mellitus. IC-Tech, 7(2), 1–6.
Primartha, R. (2021). Algoritma Machine Learning. Informatika.
Redel-Macías, M. D., Fernández-Navarro, F., Antonio Gutiérrez, P., Cubero-Atienza, A. J., & Hervás-Martínez, C. (2013). Ensembles of evolutionary product unit or RBF neural networks for the identification of sound for pass-by noise test in vehicles. Neurocomputing, 109, 56–65. https://doi.org/10.1016/J.NEUCOM.2012.03.022
Sayeed, R., Gottlieb, D., & Mandl, K. D. (2020). SMART Markers: collecting patient-generated health data as a standardized property of health information technology. Npj Digital Medicine, 3(1), 1–8. https://doi.org/10.1038/s41746-020-0218-6
Setiawan, I., Yasin, I. F., & Desianti, Y. T. (2025). Komparasi Kinerja Algoritma Random Forest, Decision Tree, Naïve Bayes, dan KNN dalam Prediksi Tingkat Depresi Mahasiswa menggunakan Student Depression Dataset. Jurnal Ilmu Komputer Dan Teknologi, 6(1), 47–58. https://doi.org/10.35960/IKOMTI.V6I1.1756
Stephanie, C., & Sarno, R. (2019). Classification talent of employee using C4.5, KNN, SVM. 2019 International Conference on Information and Communications Technology (ICOIACT), 388–393. https://doi.org/10.1109/ICOIACT46704.2019.8938508
Toh, C., & P. Brody, J. (2021). Applications of Machine Learning in Healthcare. In Smart Manufacturing - When Artificial Intelligence Meets the Internet of Things. IntechOpen. https://doi.org/10.5772/INTECHOPEN.92297
You, S., & Kang, M. (2020). A Study on Methods to Prevent Pima Indians Diabetes using SVM. Korea Journal of Artificial Intelligence, 8(2), 7–10.
Zai, A. R., Rambe, L. H., Putra, R. A., Rosnelly, R., Sagala, T. S., & Jaya, I. K. (2025). Optimasi Algoritma Genetika pada Perbandingan ANN dan KNN untuk Klasifikasi Penyakit Jantung. Majalah Ilmiah METHODA, 15(1), 10–23. https://doi.org/10.46880/METHODA.VOL15NO1.PP10-23
Zielinski, K., Duplaga, M., & Ingram, D. (2006). Information Technology Solutions for Healthcare. Springer-Verlag.