Comparing some Machine Learning Models for Cardiovascular Disease
Background and Aim: Cardiovascular disease remains a leading cause of morbidity and mortality worldwide, necessitating the development of accurate predictive models for early diagnosis. Therefore, this study aimed to evaluate and compare the performance of three machine learning models-Random Forest, Decision Tree, and K-Nearest Neighbors-in predicting cardiovascular disease based on key risk factors. Method: This retrospective study utilized patient data from Shar Hospital in Sulaimaniyah City. The dataset included demographic and clinical risk factors such as age, smoking status, diabetes, hypertension, and family history of cardiovascular disease. The three machine learning models were trained and tested using various data-splitting ratios, and their performance was assessed using accuracy, F1-score, recall, precision, and specificity. Statistical analysis and model validation were conducted using Python in Jupyter Notebook. Results: A total of 300 patient records were included in the study. The Random Forest model demonstrated the highest predictive accuracy compared to Decision Tree and K-Nearest Neighbors, consistently outperforming the other models across different training-testing configurations. Feature importance analysis revealed that age and family history were the most influential predictors of cardiovascular disease, whereas gender and marital status had minimal impact. The confusion matrix further confirmed the reliability of the Random Forest model, showing a high number of correctly classified cases with minimal false positives and false negatives. Conclusions: The findings indicate that Random Forest is the most effective model for cardiovascular disease prediction, with strong classification performance and high accuracy. The study also highlights the importance of age and family history as dominant risk factors. These results support the application of machine learning in clinical settings for early detection and risk assessment, enabling better-informed medical interventions.
Authors
- Shaymaa H. Ali (ORCID: https://orcid.org/0000-0002-0436-1407)
- Nawzad Muhammed Ahmed (ORCID: https://orcid.org/0000-0003-4878-0168)
Publication Details
- Journal
- Journal of Pioneering Medical Science
- Published
- 2025-05-05
- DOI
- https://doi.org/10.47310/jpms2025140408
- Citations
- 1
- Primary Topic
- Artificial Intelligence in Healthcare
- Type
- article
- Field-Weighted Citation Impact
- 2.94