Classification of Stroke Using the K-Nearest Neighbor (KNN) Algorithm
Keywords:KNN, Algorithm, Desease, Stroke
AbstractThe application of the classification algorithm is one solution that is able to classify the symptoms of stroke. This symptom classification in the form of a predictive model can be used as an effort to detect stroke early. The algorithm applied to build the prediction model is K-Nearest Neighbor (KNN). The KNN algorithm is proven to be able to predict the new test sample based on the Euclidean distance. The dataset consists of 5110 records, the attributes used are: gender, age, hypertension, heart_disease, ever_married, bmi, work_type, residence_type, Avg_glucosa_level, smoking_status, stroke group. The research stages are: Data Collection, Data Preprocessing, Data Split, Application of the KNN Algorithm and Evaluation of KNN performance with confusion matrix and calculation of accuracy. The best KNN algorithm performance is obtained with a value of k = 5 and an accuracy of 93.54%.
Copyright (c) 2022 Zuriati, Nurul Qomariyah
This work is licensed under a Creative Commons Attribution 4.0 International License.