Coronary heart disease is the leading cause of global mortality, accounting for 17.9 million deaths annually. Early detection is crucial in mitigating risks and preventing further complications. However, conventional diagnostic methods, such as traditional medical evaluations, often struggle to efficiently process large volumes of medical data, necessitating a more optimal approach. To enhance efficiency, this study employs machine learning to develop a classification model for coronary heart disease risk using Decision Tree and Random Forest algorithms. These models are then compared to determine the most optimal approach. The model is built using the Framingham Heart Study Dataset, consisting of 4,240 records with 15 relevant features. Due to class imbalance in the target variable, the Random Over-Sampling method is applied to improve classification performance. Model evaluation is conducted using a confusion matrix to compare the performance of both algorithms. The results indicate that Random Forest outperforms Decision Tree, achieving an accuracy of 97.64%, precision of 96.02%, recall of 99.29%, and F1-score of 97.63%. In contrast, Decision Tree yields an accuracy of 91.04%, precision of 84.76%, recall of 99.57%, and F1-score of 91.57%. This study suggests that Random Forest is more effective for early detection of coronary heart disease. Therefore, Random Forest-based models hold potential for clinical prediction systems, though further optimization is needed to enhance accuracy and reliability.
Copyrights © 2025