KNN-Based Prediction Model for Assessing Hypertension Risk from Lifestyle Features - B, Muslimin; Rowa, Heruzulkifli (INFOTEKS (Information Technology, Computer and Sciences), 2023)
Hypertension is one of the most common chronic conditions associated with serious cardiovascular complications, and its prevalence continues to rise due to the influence of lifestyle related factors, motivating the use of data driven approaches for early risk identification. Although various machine learning models have been applied in health analytics, many still face challenges in processing heterogeneous lifestyle attributes, which limits their ability to accurately detect individuals at risk. This study addresses that gap by implementing the K Nearest Neighbors algorithm to predict hypertension using a dataset of 1,985 records containing variables such as age, salt intake, stress score, sleep duration, body mass index, family history, medication use, physical activity, and smoking status. The motivation for selecting KNN lies in its simplicity, adaptability, and strong performance in classification tasks involving structured health data. The contribution of this research includes the development of a lifestyle based hypertension prediction model supported by a preprocessing pipeline and optimized hyperparameters, enabling effective handling of mixed numerical and categorical features. The model is evaluated using accuracy, precision, recall, f1 score, and confusion matrix visualization, achieving an accuracy of 85 percent with balanced performance across both classes, showing that KNN offers reliable generalization for this dataset. Future work involves comparing KNN with ensemble or deep learning models, exploring feature selection techniques, and expanding dataset diversity to improve model robustness and applicability for real world digital health solutions.