Brain Stroke Prediction Using the Extreme Gradient Boosting (XGBoost) Method

Authors

  • Iyang Maisi Fitriani Institut Kesehatan Payung Negeri Pekanbaru Author
  • Defi Febriyanti Universitas Prima Nusantara Bukittinggi Author
  • Ely Nurhalizah Nasution Universitas Prima Nusantara Bukittinggi Author

DOI:

https://doi.org/10.35730/mzq3gk84

Keywords:

Brain Stroke Prediction, Extreme Gradient Boosting, XGBoost, Machine Learning, Clinical Decision Support

Abstract

Brain stroke is a critical medical emergency and one of the leading causes of mortality and long-term disability worldwide. Early identification of individuals at high risk of stroke is essential for timely clinical intervention and preventive care. However, medical datasets for stroke prediction frequently suffer from severe class imbalance, where non-stroke instances vastly outnumber positive stroke cases, causing standard machine learning classifiers to exhibit bias toward the majority class. This study proposes a machine learning pipeline for brain stroke prediction using the Extreme Gradient Boosting (XGBoost) algorithm. Utilizing the Kaggle Brain Stroke dataset comprising 4,981 patient records with 10 clinical and demographic features, we conducted comprehensive Exploratory Data Analysis (EDA), data cleaning, categorical encoding, and feature preprocessing. To address the severe class imbalance—where only 4.98% (248 patients) experienced a stroke compared to 95.02% (4,733 patients) without stroke—class weighting (scale_pos_weight) and resampling strategies were integrated into the modeling workflow. Experimental findings demonstrate that age, average glucose level, hypertension, heart disease, and body mass index (BMI) are the most influential predictors of stroke occurrence. The XGBoost model effectively captures non-linear interactions among clinical risk factors, achieving high sensitivity and Area Under the Receiver Operating Characteristic Curve (ROC-AUC) performance, making it a reliable decision-support tool for early stroke risk screening.

Downloads

Published

2026-09-30