An Education Resource Allocation Model Integrating K-Means Clustering and Random Forest Algorithm: Effectiveness Evaluation for Enhancing Social Welfare
Fei Pang, Yingxu Li, Guo Miao, Yun ShiEducational resource allocation requires the simultaneous consideration of regional demand heterogeneity, spatial adjacency, and nonlinear prediction relationships. This study presents an integrated framework that combines Spatially Constrained Entropy-Weighted K-Means (SCEW-KMeans) with Bayesian Optimization–Random Forest (BO-RF). SCEW-KMeans employs entropy weights to quantify the informational heterogeneity of indicators related to educational supply, population demand, and fiscal capacity, incorporates county-level spatial adjacency into the clustering objective function, and identifies stable regional partitions through Bootstrap consensus selection. During the demand forecasting stage, a nested spatial block cross-validation strategy is adopted, with Linear Regression (LR), Support Vector Regression (SVR), Global Random Forest (RF), Extreme Gradient Boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), and Categorical Boosting (CatBoost) serving as unified competitive benchmark models. Experimental results based on annual observational data from 95 county-level administrative units in Jiangsu Province from 2021 to 2023 demonstrated that the SCEW-KMeans and BO-RF joint framework achieved a mean squared error (MSE) of 94.9 and a coefficient of determination (R2) of 0.879 in predicting county-level per-student fiscal expenditure on education. The clustering results attain an average silhouette coefficient of 0.65, a Bootstrap-Adjusted Rand Index (ARI) of 0.91, and a spatial boundary cut ratio of 0.18.