Skip to content

An Intelligent Web-Based Heart Disease Prediction System Using Random Forest Classifier with Machine Learning Analysis

Jun 2026 · International Scientific Journal of Engineering and Management · Vol 05, pp. 1-6 · 0 citations

TL;DR

An intelligent machine learning-based web application that predicts the presence or absence of heart disease in patients based on 13 key medical parameters such as age, cholesterol, blood pressure, chest pain type, and maximum heart rate is presented.

Abstract

Disease is one of the leading causes of death worldwide, making early and accurate diagnosis critically important for saving millions of lives each year. This project presents an intelligent machine learning-based web application that predicts the presence or absence of heart disease in patients based on 13 key medical parameters such as age, cholesterol level, blood pressure, chest pain type, and maximum heart rate. The system employs a Random Forest Classifier trained on the Cleveland Heart Disease dataset sourced from the UCI Machine Learning Repository. Six machine learning algorithms were implemented and rigorously compared including Logistic Regression, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), Gradient Boosting, XGBoost, and Random Forest Classifier. The Random Forest algorithm achieved the best performance with a test accuracy of 87.80% and an outstanding AUC score of 0.9550. The trained model is deployed as an interactive web application using the Streamlit framework, allowing healthcare professionals to input patient data and receive instant predictions along with risk percentages and treatment recommendations. This system serves as a reliable and cost-effective decision-support tool to assist doctors in early detection and timely intervention for heart disease. Keywords: Random Forest Classifier, Logistic Regression, Support Vector Machine, K-Nearest Neighbors, XGBoost, Gradient Boosting, StandardScaler, Streamlit, Python, Heart Disease Prediction, Machine Learning, AUC Score, Confusion Matrix

View source

Similar papers

Open access Jul 2026

Diabetes Prediction System Using Machine Learning

Experimental results demonstrate that Machine Learning techniques can effectively predict disease occurrence with high accuracy, thereby assisting healthcare professionals in early diagnosis and treatment planning.

Sunidhi, Mothe Rahul, Mr. D. Pramod Kumar et al. · 0 citations
Open access Aug 2026

PREDICTING HEART DISEASE RISK FROM CLINICAL VARIABLES: A GENDER-SPECIFIC MACHINE LEARNING ANALYSIS AMONG HIGH-CHOLESTEROL PATIENTS

Cardiovascular disease remains a major cause of mortality and economic burden in the United States. This study developed and evaluated supervised machine learning models to predict heart disease risk from routine clinical variables and tested whether male patients with high cholesterol have higher odds of heart disease than female patients. Using a publicly available clinical dataset of 918 patients, the Cross-Industry Standard Process for Data Mining (CRISP-DM) framework guided exploratory analysis, data cleaning, median imputation of irregular cholesterol values, and feature selection using principal component analysis (PCA) and SelectKBest. Logistic Regression, Support Vector Machine (SVM), and a soft voting ensemble were trained and tuned using grid search with stratified 5-fold cross-validation. The ensemble achieved the highest predictive performance (accuracy = 0.940, F1 = 0.950, receiver operating characteristic area under the curve [ROC-AUC] = 0.958). Logistic Regression achieved comparable performance (accuracy = 0.929, F1 = 0.940, ROC-AUC = 0.958) and was selected for hypothesis testing because of its interpretability. Among patients with cholesterol ≥240 mg/dL, male sex was a statistically significant independent predictor of heart disease after controlling for other clinical variables. The findings support sex-specific screening and preventive strategies for high-cholesterol male patients and demonstrate the value of interpretable machine learning models for clinical decision support. Larger externally validated datasets are needed to assess generalizability.

Taiwo Samson Adeyemo · 0 citations
Open access Jul 2026

Heart Disease Prediction Using Logistic Regression and K-Nearest Neighbor: A Comparative Study of Classification Algorithm Performance

Heart disease remains one of the leading causes of mortality worldwide, highlighting the importance of accurate and timely prediction models to support early clinical decision-making. Objective: This study aims to compare the predictive performance of Logistic Regression and K-Nearest Neighbor (KNN) algorithms for heart disease classification and to identify the most appropriate model for early screening. Methodology: A quantitative comparative research design was employed using the Cleveland Heart Disease dataset from the UCI Machine Learning Repository, consisting of 303 patient records. The data were divided into training and testing sets using an 80:20 split. Logistic Regression was developed using backward stepwise selection, while KNN used standardized numerical variables with K = 15. Model performance was evaluated using accuracy, sensitivity, specificity, and precision. Findings: Logistic Regression outperformed KNN by achieving an accuracy of 83.6%, sensitivity of 93.5%, specificity of 73.3%, and precision of 78.4%. In comparison, KNN achieved an accuracy of 80.3%, sensitivity of 89.5%, specificity of 65.2%, and precision of 81.0%. These results indicate that Logistic Regression provides more reliable overall performance, particularly in identifying patients with heart disease. Implications: The findings suggest that Logistic Regression is more suitable as a decision-support model for early heart disease screening due to its higher sensitivity, accuracy, and specificity. This model may support healthcare professionals in identifying at-risk patients and reducing the likelihood of missed heart disease cases. Originality: The originality of this study lies in its transparent comparison of Logistic Regression and KNN using a standardized benchmark dataset while emphasizing clinically relevant evaluation metrics, particularly sensitivity. This approach provides additional empirical evidence for selecting interpretable machine learning models in clinical prediction tasks.

Yan Risa, Aspi Sururi, M. Asadullah et al. · 0 citations
Preprint Aug 2026

Transforming Heart Disease Prediction with Advanced Machine Learning Techniques

Heart disease remains the leading cause of mortality globally, necessitating early and accurate detection to improve patient outcomes. This research focuses on the predictive analysis of heart disease using machine learning (ML) techniques, comparing the performance of multiple classifiers to identify the most accurate and least error-prone method. Two datasets from UCI and Kaggle repositories were utilized, each containing 14 attributes related to heart health indicators. Techniques including J48, Naive Bayes, Logistic Regression, Simple Cart, Bagging, Decision Stump, AdaBoost, Artificial Neural Networks, and Support Vector Machine (SVM) were applied. Evaluation metrics such as Mean Absolute Error (MAE), Relative Absolute Error (RAE), accuracy, precision, recall, and F-measure were used for performance comparison. Results revealed that SVM achieved the highest performance on the UCI dataset, while Simple Cart performed best on the Kaggle dataset, offering the highest accuracy and lowest error rates. The research work concludes that ML models, when properly tuned and validated, can significantly assist in the early diagnosis of heart disease, offering critical support for clinical decision-making. Future work may involve hybrid approaches and the use of more recent datasets to further improve prediction accuracy.

Sami Ullah, Muhammad Mohsin Khan · 0 citations
Open access Jul 2026

Machine Learning-Based Early Prediction of Hospital Readmission Risk Among Chronic Disease Patients Using Electronic Health Records: A Comparative Study of Ensemble Learning Models

Hospital readmission among patients with chronic diseases remains a major challenge for healthcare systems due to its association with poor patient outcomes and increased healthcare costs. This study proposes a machine learning-based framework for the early prediction of 30-day hospital readmission risk using the publicly available Diabetes 130-US Hospitals dataset from the UCI Machine Learning Repository. A comprehensive preprocessing pipeline, feature engineering, and feature selection techniques were employed to improve data quality and predictive performance. Eight supervised machine learning algorithms, including Logistic Regression, Decision Tree, Random Forest, Support Vector Machine, LightGBM, CatBoost, Multilayer Perceptron, and XGBoost, were developed and comparatively evaluated. Model performance was assessed using accuracy, precision, recall, F1-score, specificity, and the area under the receiver operating characteristic curve (AUC-ROC). The experimental results demonstrated that ensemble learning models consistently outperformed conventional machine learning approaches. Among all evaluated models, XGBoost achieved the best performance, attaining 92.16% accuracy, 0.92 precision, 0.91 recall, 0.91 F1-score, 0.95 specificity, and an AUC-ROC of 0.972. These findings indicate that XGBoost effectively identifies patients at high risk of early hospital readmission and can serve as a reliable predictive tool for clinical decision support. The proposed framework has strong potential for integration with Electronic Health Record systems to facilitate early intervention, improve patient outcomes, reduce preventable readmissions, and support value-based healthcare delivery.

Md Yassir Mottalib, Eklachur Rahman Bhuiyan, Anwar Hossain et al. · 0 citations
Open access Jul 2026

Stroke prediction using Ensemble Learning

Stroke is one of the leading causes of death and long-term disability worldwide, making early prediction and preventive healthcare extremely important. Traditional methods of stroke diagnosis mainly depend on clinical observations and medical expertise, which may sometimes delay timely identification of high-risk patients. To address this challenge, the proposed project “Stroke Prediction Using Ensemble Learning” introduces an intelligent healthcare prediction system that utilizes machine learning techniques to predict the likelihood of stroke occurrence based on patient health parameters. The system analyzes important medical attributes such as age, hypertension, heart disease, glucose level, body mass index (BMI), smoking status, and other lifestyle-related factors to provide accurate stroke risk assessment. The proposed model employs Ensemble Learning techniques, which combine multiple machine learning algorithms to improve prediction accuracy and robustness. Algorithms such as Random Forest, Gradient Boosting, AdaBoost, and Voting Classifier are integrated to enhance overall system performance and reduce the limitations of individual models. Data preprocessing techniques including missing value handling, normalization, feature selection, and class balancing are applied to improve the quality of the dataset and ensure reliable predictions. The trained ensemble model is capable of identifying complex patterns in medical data and classifying patients into stroke-risk categories with high efficiency. The system is designed with a user-friendly interface that allows healthcare professionals or users to input patient information and obtain instant prediction results. Performance evaluation metrics such as accuracy, precision, recall, F1-score, and confusion matrix are used to assess the effectiveness of the proposed model. By providing early stroke risk prediction, the system can support doctors in decision-making, promote preventive healthcare, and reduce mortality rates associated with stroke. The proposed approach demonstrates how ensemble learning and artificial intelligence can contribute significantly to modern healthcare systems by enabling faster, more accurate, and cost-effective medical predictions.

Bhagyashri Patil, Priyadarshini C Patil, Soumya M A et al. · 0 citations