Interpretable Stacked Machine Learning for Multiclass Nutritional Status Classification and Individualized Feature Profiling in Mexican Preschool Children
Alejandro Gabriel González-Garay, Edwar Hernando Macias-ToroChildhood undernutrition, overweight, and obesity coexist in Mexico, but anthropometric classification alone does not characterize the broader context accompanying each child’s nutritional phenotype. We developed and evaluated an interpretable machine learning framework for concurrent four-class nutritional status classification and individualized feature profiling using data on 8268 children younger than 72 months from the 2018–2023 Mexican National Health and Nutrition Survey (ENSANUT). Nutritional status was defined according to World Health Organization weight-for-height standards. The primary analysis used 78 predictors, including current child weight and height but excluding body mass index and anthropometry-derived z-scores; a 76-predictor ablation step removed weight and height before model development. Multinomial logistic regression, calibrated LinearSVC, random forest, XGBoost, soft voting, and a stacked neural network ensemble were evaluated using leakage-aware preprocessing, repeated stratified five-fold cross-validation, an independent internal hold-out sample, and ENSANUT 2023 as a later survey-wave evaluation. In the internal hold-out sample, XGBoost achieved the highest macro-F1 (0.736) and macro-average precision (0.757), whereas the stacked ensemble achieved the highest balanced accuracy (0.823). In ENSANUT 2023, XGBoost retained the highest macro-F1 (0.680) and macro-average precision (0.762), while the stacked ensemble achieved the highest macro-AUC (0.977). Removing current weight and height markedly reduced performance across all models, demonstrating substantial dependence on outcome-defining anthropometry. Probability calibration varied across algorithms, with substantial calibration-in-the-large deviations for the stacked ensemble. SHAP and repeated LIME analyses of the complete ensemble confirmed the dominant contribution of current anthropometry while identifying additional contextual contributions. The framework should therefore be interpreted as a methodological proof of concept for concurrent anthropometry-informed classification and feature profiling, not as a replacement for WHO growth standards or as prediction of future nutritional status. External and longitudinal validation are required before clinical use.