Stroke is one of the non-communicable diseases with a relatively high rate of mortality and disability, making early detection very important to support fast and appropriate patient treatment. This study aims to apply the Extreme Gradient Boosting (XGBoost) algorithm to predict stroke disease based on patient health data. The dataset used was obtained from Kaggle, consisting of 150 patient records, which were divided into 100 training data and 50 testing data. The data processing was carried out using Google Colab, including preprocessing, model training, and performance evaluation stages. The results show that the model achieved an accuracy of 68%, an F1-score of 0.43, and a ROC-AUC of 0.717, indicating that the model has a fairly good classification ability in distinguishing stroke and non-stroke patients. In addition, age, average glucose level, and BMI were the most influential variables in stroke prediction. This study also produced a simple web-based application used to support early stroke detection by allowing input of patient health data and automatically displaying prediction results. Thus, the XGBoost algorithm has potential as a supporting method for early stroke detection using machine learning.
Copyrights © 2026