Optimized Frog Leaping Algorithm for Enhancing AI-Based Stroke Risk Prediction Using XGBoost

Author:

Abstract
Stroke remains one of the leading causes of death and long-term disability worldwide, making early and accurate risk prediction an urgent clinical priority. This paper proposes an Optimized Frog Leaping Algorithm (OFLA) for automated hyperparameter tuning of an eXtreme Gradient Boosting (XG-Boost) classifier for stroke risk prediction. The OFLA extends the canonical Shuffled Frog Leaping Algorithm (SFLA) through four strategic enhancements: (i) an adaptive inertia weight mechanism balancing global exploration and lo-cal exploitation; (ii) an elite-frog preservation strategy that retains the top-performing individuals across shuffling cycles; (iii) Lévy-flight perturbation to escape local optima; and (iv) opposition-based population initialization for enhanced diversity. A publicly available healthcare dataset of 5,110 patient records with eleven clinical features (including age, hypertension, heart disease, average glucose level, and body mass index) is used. The severe class imbalance (4.87% stroke-positive instances) is addressed via the Synthetic Minority Over-sampling Technique (SMOTE) applied exclusively to the training partition. The OFLA optimizes nine XGBoost hyperparameters by maximizing the five-fold cross-validated AUC on the training set. On the held-out test set, the proposed OFLA-XGBoost achieves an accuracy of 96.9%, a stroke-class recall of 80.0%, a stroke-class F1-score of 71.4%, and an AUC of 0.943. These results outperform seven competing methods including standard XGBoost, Light GBM, Random Forest, SVM, Logistic Regression, and Naive Bayes. Feature importance anal- ysis confirms that age, average glucose level, and body mass index are the three most discriminative predictors. The proposed framework demonstrates the practical utility of bio-inspired metaheuristic optimization for automated ML model tuning in high-stakes healthcare applications.