Implementation of Stacking Ensemble Learning on Decision Tree Regressor for Food Commodity Price Prediction in Indonesia - Nukman Solikhudin; Mega Novita; Ramadhan Renaldy (Journal of Applied Informatics and Computing, 2026)
Fluctuations in staple food prices across Indonesian regions exhibit complex, non-linear patterns vulnerable to market shocks. This study aims to construct an accurate, stable food price prediction model utilizing a Stacking Ensemble Learning approach. A raw dataset of 27,722 records from the National Food Agency was cleaned by removing invalid data and zero values, yielding 27,270 well-indexed observations. To address severe scale disparity between commodities and heteroscedasticity effects, a natural logarithm transformation was applied to the target variable. Time-series features, specifically Lag 1 and Moving Average 3, were locally constructed based on commodity-province groups to capture temporal dependencies. The proposed Stacking Ensemble model integrates four multi-architecture base learners Ridge Regression, AdaBoost, Gradient Boosting, and Extra Tree with a Decision Tree Regressor acting as the meta-learner. Model evaluation was conducted using a temporal split method with an 80:20 ratio to strictly prevent data leakage. Experimental results demonstrate that the proposed Stacking Ensemble model achieves superior performance on nominal test data compared to baseline models, securing an R^2of 0.895, RMSE of 2,531, and MAE of 1,461. Furthermore, the model proved highly robust in balancing bias and variance, yielding the smallest R^2Gap of 0.035. Model transparency analysis reveals a powerful temporal inertia, where historical features dominate the decision weight by up to 87.55%. However, per-commodity performance analysis highlights a performance limitation on subsidized commodities (Minyak Kita) due to data distortion caused by non-market Price Ceiling regulations. This study provides critical implications for food authorities to formulate data-driven, responsive market interventions.