Early Detection of Heart Failure Risk Through Machine Learning and Data-Driven Analysis
Keywords:
Heart Failure, Machine Learning, Deep Learning, Risk Prediction, Clinical Features, Imbalance HandlingAbstract
Heart failure is a major cause of death and long-term illness, and many patients show mild or hidden symptoms until serious complications appear. Early risk detection is important for timely care and better outcomes. This study presents a full machine learning framework for heart failure risk prediction using simple clinical features. The workflow includes data preprocessing, normalization, handling of missing values, class balancing with SMOTE, and supervised learning with Logistic Regression, Random Forest, XGBoost, Support Vector Machine, and two deep learning models. All models were trained and tested on clean structured data and evaluated with accuracy, precision, recall, F1 score, ROC AUC, and MCC. The experimental results show that Logistic Regression achieved the strongest overall performance with an accuracy of 88.6%, a recall of 93.1%, an F1 score of 90.0%, a ROC AUC of 93.1%, and an MCC of 76.9%. Random Forest also performed well with an accuracy of 87.5% and stable results across metrics. XGBoost reached an accuracy of 85.9% and a ROC AUC of 92.8%. Deep learning models showed moderate performance because of the limited number of features, with the DNN achieving 78.3% accuracy and the 1D CNN reaching 82.6%. These findings confirm that simple models can provide strong and stable predictions and can support early heart-failure screening in clinical settings.


