Comparative Analysis of Naïve Bayes and K-Nearest Neighbor (KNN) Algorithms in Stroke Classification - Iswara, Ida Bagus Ary Indra; Anandita, Ida Bagus Gede; Dahul, Maria (Journal of Computer Networks, Architecture and High Performance Computing, 2024)
Stroke, also known as cerebrovascular, is a type of Non-Communicable Disease (NCD). The symptoms of this disease arise due to a blockage (ischemic) or rupture (hemorrhagic) of a blood vessel that disrupts blood flow to the brain. This condition causes a lack of oxygen and nutrients to brain cells, resulting in damage and potentially death. This research aims to compare the use of Naive Bayes and K-Nearest Neighbor (K-NN) algorithms in classifying stroke diseases. The research process involves data collection, data validation, data preprocessing, data reading, data transformation, data splitting, model implementation, classification evaluation, application of Naive Bayes and K-Nearest Neighbor (K-NN) algorithms, and comparative analysis of results. The variables used in this study include: gender, age, hypertension, heart disease, ever married, work type, residence type, avg glucose level, bmi, smoking status, stroke. Sugar, BMI, Smoking Status, Stroke. Based on the experiments conducted, it was found that the Naive Bayes algorithm achieved an average accuracy rate of 91.67%, while the K-Nearest Neighbor (K-NN) algorithm achieved an average accuracy rate of 95.59%. Therefore, it can be concluded that the K-Nearest Neighbor (K-NN) algorithm has a higher average accuracy rate than the Naive Bayes algorithm, with a percentage difference in accuracy of 3.92%.