| International Journal of Computer Applications |
| Foundation of Computer Science (FCS), NY, USA |
| Volume 187 - Number 67 |
| Year of Publication: 2025 |
| Authors: Nawir Khalid Al-Waeli, Renad Hazzaa Al-Masabi, Shroq Ahmad Alhamami, Ahmad M.Alkheder Alamami |
10.5120/ijca2025926161
|
Nawir Khalid Al-Waeli, Renad Hazzaa Al-Masabi, Shroq Ahmad Alhamami, Ahmad M.Alkheder Alamami . Early Detection of Heart Disease using a Random Forest Classifier on the UCI Heart Disease Dataset. International Journal of Computer Applications. 187, 67 ( Dec 2025), 29-33. DOI=10.5120/ijca2025926161
The heart disease is still among the top causes of death all over the world, which means that there will be an urgent demand for systems that would help in clinical decision making through accurate and early detection. This research made use of the UCI Heart Disease Dataset, which consists of 1,025 patient records and 13 clinical features[1], to predict the diagnosis of heart disease. The dataset contains both numerical and categorical attributes, like age, sex, type of chest pain, resting blood pressure, cholesterol, ECG, maximum heart rate, exercise-induced angina, ST depression (oldpeak), slope, number of vessels, and thalassemia. All categorical variables were encoded with labels, and the data was split into training and testing sets for reliable evaluation to be possible. Only one single supervised machine learning model, as Random Forest Classifier, was chosen as it had proved to be very strong and effective on clinical data with structure. The model was trained with the optimized parameters (300 estimators, max depth = 10) and very competitive results were obtained: accuracy of 97.66%, precision of 100%, recall of 95.2% and F1-score of 97.54%. The confusion matrix assured the robustness of the predictive power by correctly identifying 251 out of 257 test samples. Thus, the Random Forest method is found to be very accurate for the early detection of heart disease and has the potential to be integrated into real-world medical diagnostic systems.