Perbandingan Kinerja Naïve Bayes, SVM, dan Random Forest dalam Klasifikasi Risiko Kehamilan - Reva Ekalia; Dyah Ayu Megawaty (Building of Informatics, Technology and Science (BITS), 2026)
Classifying pregnancy risk levels is a crucial aspect in supporting early detection of potential complications in pregnant women. However, most previous studies have focused on a single algorithm and relied solely on accuracy metrics, thus failing to provide a comprehensive picture of model performance in multiclass classification. Furthermore, performance comparisons between algorithms using more comprehensive evaluation approaches are still limited. This study aims to analyze and compare the performance of the Naïve Bayes, Support Vector Machine (SVM), and Random Forest algorithms in classifying pregnancy risk levels using the Maternal Health Risk Dataset from the UCI Machine Learning Repository, which consists of 1,014 data sets with six maternal health attributes. The methods used include data preprocessing, hyperparameter optimization using GridSearchCV, and model evaluation using Stratified K-Fold Cross Validation with k = 10. Model performance was measured using accuracy, precision, recall, and F1-score metrics to provide a more comprehensive evaluation. The results showed that the Random Forest algorithm had the best performance with an accuracy value of 0.8629, precision of 0.8704, recall of 0.8629, and F1-score of 0.8635, followed by SVM and Naïve Bayes. The superiority of Random Forest is due to its ability to combine several decision trees and capture non-linear relationships between features, resulting in more accurate and stable predictions. Thus, Random Forest is recommended as the most effective method in pregnancy risk classification based on maternal health data.