Skip to content
Open access

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

Jul 2026 · International Journal for Sciences and Technology · 0 citations · 8 references

TL;DR

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.

Abstract

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.

Read PDF

Similar papers

Open access Aug 2026

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

Male sex was a statistically significant independent predictor of heart disease after controlling for other clinical variables and 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 deci...

T. Adeyemo · 0 citations
Preprint Aug 2026

Transforming Heart Disease Prediction with Advanced Machine Learning Techniques

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.

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

Machine Learning-Based Early Cardiovascular Disease Prediction: A Comparative Analysis of Supervised Learning Algorithms Using a Pakistani Clinical Dataset

The results confirm the effectiveness of ensemble learning approaches for medical diagnostics and highlight the potential of implementing ML-based screening tools in the limited resource healthcare environment in Pakistan.

Awais Khursheed, Soban Ahmed, Sibghat Ullah et al. · 0 citations
Open access Jul 2026

A Comparative Machine Learning Framework for Early Diabetes Risk Prediction

This study investigated the application of machine learning techniques and exploratory data analysis to forecast early-onset of diabetes using the PIMA Indian dataset, finding promising results.

Abdulrahman Nasiru Sada, Eli. A. Jiya, Yahaya Muhammad Umar et al. · 0 citations
Open access Jul 2026

MACHINE LEARNING-BASED PREDICTION OF HEART FAILURE MORTALITY USING CLINICAL BIOMARKERS AND IMBALANCED DATA STRATEGIES

It is demonstrated that machine learning models can effectively identify high-risk patients and that minority data resampling significantly improves mortality classification reliability, and the approach offers potential value for clinical decision support systems and prioritised care pathways.

Abiodun Ojo · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.