Abstract
Cardiovascular diseases are prominent contributors to mortality worldwide, and timely identification is crucial for enhancing patient prognosis. The protracted and exhaustive diagnostic procedures that result in delayed diagnosis can culminate in precarious circumstances that are difficult or impossible to manage. The utilisation of machine learning (ML) methodologies has the potential to facilitate the timely prediction of heart disease based on specific medical reports, thereby affording individuals the convenience of conducting such assessments from the comfort of their own homes. Using a dataset consisting of medical records and clinical attributes, ten models were evaluated, including decision tree, [ ]-nearest neighbours, gradient boosting, random forest, AdaBoost, support vector machine, logistic regression, naive Bayes, a hypertuned gradient boosting model, and a StackingCV ensemble model. Utilising performance metrics such as accuracy, precision, recall, [ ]1-scores, and the ROC-AUC, their predictive capabilities were evaluated. The random forest classifier achieved an accuracy of 0.94, demonstrating its high discriminatory power in identifying cases of cardiovascular disease. With an accuracy of 0.91, the [ ]-nearest neighbours model demonstrated its potential for accurate classification. Intriguingly, the hypertuned gradient boosting model significantly outperformed the baseline model, achieving an impressive accuracy of 0.96. Additionally, the StackingCV ensemble model demonstrated superior accuracy, recall, [ ]1-scores, and an ROC–AUC of 0.99, surpassing all the individual classifiers. These results demonstrate the effectiveness of ML algorithms in the detection of heart disease. The random forest classifier, the hypertuned gradient boosting model, and the StackingCV ensemble models demonstrate high accuracy and show promise for implementation in clinical settings.