Penerapan Algoritma K-Nearest Neighbor (KNN) untuk Memprediksi Stroke pada Rumah Sakit Pusat Otak Nasional Prof. Dr. dr. Mahar Mardjono Jakarta

  • Annisa Cintakami Firdaus Universitas Pancasila
  • Ionia Veritawati Universitas Pancasila
Keywords: K-Nearest Neighbor, prediction, stroke

Abstract

Stroke cases are now increasingly common, predominantly affecting individuals aged 40 and
above. Many stroke cases referred to RS PON arrive in a delayed state, reducing the chances of
recovery. The K-NN algorithm is a machine learning algorithm that can be used to classify types
of strokes. K-NN is utilized to classify two stroke categories are Cerebral Infarction (Ischemic
Stroke) and Intracerebral Hemorrhage (Hemorrhagic Stroke). In general, this research follows
several stages, beginning with directly collecting stroke patient data, processing the data using the
Python programming language, performing data preprocessing and normalization, and splitting
the dataset into training and testing sets. The model is trained using data with known stroke types,
enabling stroke type prediction. The evaluation process yielded optimal classification results with
a training data composition of 80% and a test data composition of 20%. The highest classification
accuracy was obtained when K was set to 3 achieving 70%.

Published
2025-04-30