Health & Medicinearticle2026-08-07

Uncovering complex correlations between multidimensional factors and breastfeeding duration using XGBoost

Open access0 citations

Abstract

Background Breastfeeding duration is influenced by a complex interplay of obstetric, physiological, and sociodemographic factors. Traditional linear statistical models often struggle to capture the high-dimensional, non-linear synergistic effects among these variables, while complex deep learning models are prone to overfitting on small clinical datasets. Methods To address these challenges, this study proposes an interpretable machine learning framework based on eXtreme Gradient Boosting (XGBoost) . We analyzed clinical follow-up data from 210 postpartum women. The framework incorporates Explicit Polynomial Feature Engineering to construct high-order interaction terms and utilizes SMOTE to resolve class imbalance. Crucially, SHAP (SHapley Additive exPlanations) analysis was employed to provide bidirectional feature attribution. Results: The proposed model achieved robust, cross-validated performance with an Accuracy of 76.2% (95% CI: 64.3%−88.1%) , an AUC of 0.72 (95% CI: 0.54–0.89) , and a high Recall of 0.92 for the long-term breastfeeding group (≥ 11 months), outperforming traditional baselines. SHAP analysis identified critical non-linear risk patterns. Notably, the interaction between “Delivery Mode × Milk Stasis Duration” demonstrated that the protective effect of vaginal delivery mitigates stasis risks, whereas Cesarean sections disproportionately amplify the inhibitory effect of milk stasis. Additionally, the negative interaction of “Education × Feeding Type” highlighted the compounded risk for highly educated mothers transitioning to mixed feeding. Conclusions This study confirms that an interpretable XGBoost framework with explicit interaction features effectively overcomes the modeling bottlenecks of small-sample clinical data. By uncovering hidden synergistic risk factors, it provides a data-driven basis for precision lactation support, advocating for targeted interventions for specific high-risk profiles rather than generic education.

// Source

Authors: Lijing Yang, Wanju Wang, Yajuan Chen