Claim Missing Document
Check
Articles

Found 1 Documents
Search

Heart Disease Prediction Using Logistic Regression and K-Nearest Neighbor: A Comparative Study of Classification Algorithm Performance Yan Risa Aspi Sururi; M. Asadullah Al Ghozi
International Journal Science and Technology Vol. 5 No. 2 (2026): July: International Journal Science and Technology
Publisher : Asosiasi Dosen Muda Indonesia

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.56127/ijst.v5i2.2092

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.