EXPLAINABLE ARTIFICIAL INTELLIGENCE (XAI) FOR CLASSIFICATION OF OBESITY: A COMPARATIVE STUDY BASED ON LOCAL AND GLOBAL INTERPRETABILITY
Abstract
Obesity is one of the leading global health problems that cause the development of chronic diseases, thus the development of highly accurate and interpretable predictive models is necessary for prevention. While there have been numerous successful applications of machine learning (ML) to classify cases of obesity, most of them focus on high accuracy rather than interpretability and hardly evaluate agreement between different explanation techniques. The current paper proposes an interpretable ML approach for seven-class obesity classification based on the lifestyle dataset with 2,111 samples. Logistic Regression (LR), Random Forest (RF), k-Nearest Neighbors (KNN), and Decision Tree (DT) were developed using the caret package in R. Stratified 80/20 train-test splitting and five-fold cross-validation were used. Accuracy, macro F1-score, Cohen’s Kappa, and area under the ROC curve (AUC) were used as evaluation metrics. Permutation Feature Importance (PFI) and Local Interpretable Model-Agnostic Explanations (LIME) were used to derive global and local explanations respectively. LR and RF achieved the highest performance (Accuracy = 96.19%, Kappa = 0.956), RF showed the best discrimination (AUC = 0.9988), KNN reached an accuracy of 0.812, and DT was the weakest (0.545) because its tuned structure relied almost exclusively on Weight and Gender. Weight was the dominant predictor under PFI for all four models and under LIME for DT, LR, and RF, whereas Height was important mainly for LR and RF. LIME explanations for KNN were led by behavioral variables (SMOKE, CAEC, and SCC). Agreement between LIME and PFI was strong for RF (r = 0.969, ρ = 0.817), moderate for LR (r = 0.854, ρ = 0.564), artificially inflated for DT (r = 0.999, ρ = 0.592), and absent for KNN (r = −0.106, ρ = 0.097). Overall, RF offered the best balance of accuracy, robustness, and explanation consistency, while LR provided the most clinically transparent structure. Because roughly 77% of the records are synthetic, the findings should be read as a methodological comparison rather than as evidence of real-world performance.












