Comparative Analysis of the C4.5 and Random Forest Algorithms for the Prediction of Diarrheal Disease - Sipra Barutu; Muhammad Iqbal; Khairul, Khairul; Darmeli Nasution (Jurnal Ilmiah Multidisiplin Indonesia (JIM-ID), 2025)
Diarrhea remains one of the leading causes of death among infants in Indonesia, especially in areas with limited access to healthcare. Environmental pollution and unhealthy lifestyles are the main causes of its spread. This study aims to compare the performance of the C4.5 and Random Forest algorithms in predicting diarrhea cases among infants in the working area of the Parlilitan Subdistrict Health Center, Humbahas Regency, North Sumatra Province. Secondary data were obtained from medical records and health center reports, which were then analyzed using Python. Model performance evaluation was conducted using the metrics Accuracy, Precision, Recall, F1-Score, Specificity, False Positive Rate (FPR), and True Positive Rate (TPR). The test results showed that the C4.5 algorithm had superior performance with an Accuracy of 0.92; Precision, Recall, and F1-Score of 0.875 each; Specificity of 0.9412; and FPR of 0.0588. Meanwhile, Random Forest obtained an Accuracy of 0.88; Precision of 0.7778; Recall of 0.875; F1-Score of 0.8235; Specificity of 0.8824; and FPR of 0.1176. These findings indicate that C4.5 is more effective in maintaining a balance between prediction accuracy and detection capability, and is better at minimizing classification errors for negative classes.