This study develops and evaluates a Random Forest Regression model for predicting the Food Security Index (IKP) using climate and socioeconomic panel data from 33 regencies/cities in North Sumatra, with Deli Serdang Regency as the principal case discussed. The predictors comprise poverty rate, gross regional domestic product (GRDP) per capita, annual rainfall, and annual rainy days. The common modeling period was 2020–2021. Of 66 potential regency-year observations, eight lacked IKP values in 2021, leaving 58 complete observations. To account for the panel structure, model performance was evaluated using nested group-aware cross-validation, with regency/city as the grouping variable. Across five outer folds, Random Forest achieved RMSE 8.450 ± 2.703, MAE 6.289 ± 2.018, and R² −0.501 ± 1.500. Linear regression obtained RMSE 8.282 ± 2.431, MAE 6.401 ± 2.262, and R² −0.363 ± 1.192, while a single decision tree obtained RMSE 9.821 ± 3.482, MAE 8.030 ± 2.849, and R² −0.972 ± 1.871. Thus, no model demonstrated strong or stable out-of-group generalization. Repeated group-aware permutation analysis identified poverty rate as the most consistent predictor. The results are predictive and associational, not causal, and the present model should be regarded as an exploratory proof of concept requiring larger, spatially resolved data for robust regional forecasting.
Copyrights © 2026