An Intelligent Learning System Based on Random Search Algorithm and Optimized Random Forest Model for Improved Heart Disease Detection

Ashir Javeed, Shijie Zhou, Yongjian Liao, Iqbal Qasim, Adeeb Noor, Redhwan NourIEEE Access 2019 · DOI

Abstract

Heart failure is considered one of the leading cause of death around the world. The diagnosis of heart failure is a challenging task especially in under-developed and developing countries where there is a paucity of human experts and equipments. Hence, different researchers have developed different intelligent systems for automated detection of heart failure. However, most of these methods are facing the problem of overfitting i.e. the recently proposed methods improved heart failure detection accuracy on testing data while compromising heart failure detection accuracy on training data. Consequently, the constructed models overfit to the testing data. In order, to come up with an intelligent system that would show good performance on both training and testing data, in this paper we develop a novel diagnostic system. The proposed diagnostic system uses random search algorithm (RSA) for features selection and random forest model for heart failure prediction. The proposed diagnostic system is optimized using grid search algorithm. Two types of experiments are performed to evaluate the precision of the proposed method. In the first experiment, only random forest model is developed while in the second experiment the proposed RSA based random forest model is developed. Experiments are performed using an online heart failure database namely Cleveland dataset. The proposed method is efficient and less complex than conventional random forest model as it produces 3.3% higher accuracy than conventional random forest model while using only 7 features. Moreover, the proposed method shows better performance than five other state of the art machine learning models. In addition, the proposed method achieved classification accuracy of 93.33% while improving the training accuracy as well. Finally, the proposed method shows better performance than eleven recently proposed methods for heart failure detection.

Introduction

Heart failure remains a critical global health challenge, particularly in regions with limited medical expertise and diagnostic equipment. While automated machine learning systems offer a promising solution, many current models suffer from overfitting—performing well on testing data but failing to generalize to new patients or training sets. This phenomenon occurs when a model learns the noise in the data rather than the underlying patterns, leading to poor real-world performance.

Additionally, high-dimensional clinical data can lead to overly complex models that are difficult to deploy in resource-constrained clinical settings. Many existing models require a large number of input features to achieve high accuracy, which may not be practical in emergency or low-resource scenarios. The goal of this research is to develop a diagnostic system that is both highly accurate and computationally lean, ensuring it generalizes well to unseen data.

Methodology

The researchers propose a hybrid diagnostic system, RSA-RF, designed to balance high accuracy with model simplicity. The process begins with rigorous data preprocessing, including randomization, normalization, and standardization, followed by a two-stage optimization approach.

The proposed pipeline includes data preprocessing and a Random Search Algorithm (RSA) for feature selection.

Feature Selection via Random Search Algorithm (RSA)

A core contribution of this work is the use of a Random Search Algorithm (RSA) for feature selection. Instead of using an exhaustive search, which is computationally prohibitive, RSA generates random boolean masks to identify the most predictive subset of clinical features. This process successfully reduced the input space from 13 standard clinical attributes (such as age, sex, chest pain type, and resting blood pressure) to the 7 most impactful features. By stripping away noisy or redundant data, the model's complexity is reduced while its predictive power is enhanced.

Once the optimal feature subset is identified, it is fed into a Random Forest (RF) classifier. Random Forest is an ensemble learning method that operates by constructing a multitude of decision trees at training time. To ensure peak performance, the model's hyperparameters—specifically the number of trees ($E$) and the maximum depth ($D$)—are tuned using a Grid Search algorithm. This exhaustive search finds the "sweet spot" in the parameter space that yields the highest classification accuracy.

The optimized Random Forest classifier processes selected features to produce a final heart disease diagnosis.

Experimental Setup and Results

The RSA-RF model was evaluated using the Cleveland Heart Disease dataset from the UCI Machine Learning Repository, consisting of 297 usable instances. The study compared a standard optimized Random Forest against the proposed RSA-RF hybrid.

A key finding was the "less is more" principle: the RSA-RF model achieved its highest accuracy of 93.33% using only 7 features, outperforming a standard Random Forest using all 13 features by 3.3%. This demonstrates that feature selection not only simplifies the model but also improves its generalization.

Key performance metrics include:

  • Sensitivity (Recall): 95.12% (crucial for medical diagnosis to minimize missed cases)
  • Specificity: 89.79%
  • Area Under the Curve (AUC): 0.947 (compared to 0.860 for a simple RF)

The RSA-RF approach outperformed 11 other recently proposed methods, including those based on Support Vector Machines (SVMs), Neural Networks, and Fuzzy Logic, while maintaining high training accuracy to avoid the common pitfall of overfitting.

Conclusion

The RSA-RF system provides an efficient and accurate tool for heart disease detection, effectively mitigating overfitting through strategic feature selection and hyperparameter tuning. By reducing the required clinical features to just seven, the system is well-suited for deployment in clinical environments where time and resources are limited. Future work should focus on validating the model with larger, more diverse healthcare datasets and improving the explainability of the AI's decisions to foster trust among medical professionals.

Summary updated

BibTeX
@article{javeed2019intelligent,
  author = {Ashir Javeed and Shijie Zhou and Yongjian Liao and Iqbal Qasim and Adeeb Noor and Redhwan Nour},
  title = {{An Intelligent Learning System Based on Random Search Algorithm and Optimized Random Forest Model for Improved Heart Disease Detection}},
  journal = {IEEE Access},
  year = {2019},
  doi = {10.1109/access.2019.2952107},
}
Figure