Heart failure remains a major cause of mortality worldwide, and predicting patient survival has become a key area where machine learning can support clinical decision-making. This study aims to improve the accuracy of survival prediction for heart failure patients by applying hyperparameter tuning to the Random Forest algorithm. Using a publicly available dataset from the UCI Machine Learning Repository, a structured machine learning pipeline was developed. This includes data preprocessing, outlier treatment using the capping method, stratified data splitting, and model training. The Random Forest model was first trained using default parameters to establish a baseline, and then optimized using Grid Search Cross Validation to identify the best hyperparameter configuration. Results show that the optimized model achieved improved accuracy (80.83%), recall (66.00%), and F1-score (0.7416) compared to the baseline. These improvements demonstrate that systematic tuning of machine learning models can significantly enhance their predictive capability in clinical settings. The model showed greater sensitivity in identifying high-risk patients, which is essential for early intervention strategies. Although limited by the dataset size, this study offers a replicable framework for predictive modeling in healthcare and underscores the potential of machine learning as a tool for mortality risk stratification.
Copyrights © 2026