Under the accelerating demographic aging trend, the rational allocation of elderly care facilities has emerged as a critical challenge. Although existing studies have investigated elderly care facilities planning using conventional methods, they frequently overlook the nonlinear interactions between built environment factors and heterogeneous demands across different elderly care facility types. This study addresses these gaps by proposing a data-driven framework that integrates machine learning with spatial analysis to optimize elderly care facility distribution in Xi’an City central area, Shaanxi Province, China. Leveraging multi-source datasets encompassing points of interest (POIs), road networks, and demographic statistics, we classify facilities into three categories (service-oriented, activity-oriented, and care-oriented) and employ an XGBoost model with SHAP interpretability to evaluate spatial distributions and influencing factors. The results demonstrate that the XGBoost model outperforms comparative algorithms (Random Forest, CatBoost, LightGBM) with superior performance metrics (accuracy rate of 97%, precision of 95%, and F1-score of 90%), effectively capturing nonlinear thresholds effects. Key findings reveal the following: (1) Accessibility and road density exert threshold effects on care-oriented facilities, with facility attractiveness saturating when these values exceed 6; (2) Land use intensity and medical resources positively correlate with activity-oriented facilities, while excessive retail density inhibits their distribution; (3) Service-oriented facilities thrive in areas with balanced accessibility and moderate commercial diversity. Spatial analysis identifies clustered distribution patterns in urban core areas contrasted with peripheral deficiencies, indicating need for targeted interventions. This research contributes a scalable methodology for equitable facility planning, emphasizing the integration of dynamic built environment variations with model interpretability. The framework provides significant implications for formulating age-friendly urban policies applicable to global cities undergoing rapid urbanization and population aging.
Liu et al. (2025) studied this question.