This study aims to compare the C4.5 Decision Tree and Naive Bayes algorithms in predicting heart disease to determine the most efficient algorithm. Heart disease is one of the leading causes of global mortality, including in Indonesia, due to vascular damage that disrupts the optimal functioning of the heart. The dataset used comes from the UCI Machine Learning Repository and the Kaggle website's "Heart Failure Prediction," totaling 918 records with 11 clinical attributes and 1 label. Data processing was conducted using Google Colab with the Python programming language. The results show that the C4.5 algorithm achieved an accuracy of 95.18% after feature selection using Particle Swarm Optimization (PSO), while without feature selection, it achieved an accuracy of 81%, precision of 83%, recall of 74%, F1-score of 78%, and an AUC value of 81%. Meanwhile, the Naive Bayes algorithm achieved a maximum accuracy of 90.87% without feature selection and performed best with an accuracy of 84%, precision of 83%, recall of 80%, F1-score of 81%, and an AUC value of 94%. These findings indicate that the Naive Bayes algorithm outperformed the C4.5 algorithm in several evaluation parameters.
Copyrights © 2024