Forecasting Medium Rice’s Retail Price with Machine Learning in Gorontalo Province - Giu, Jamal Darusalam; Gaib, Amalan Fadil; Rasyid, Abdul (Fakultas Ilmu Komputer, Universitas Klabat, 2025)
The stability of rice prices is essential for food security in Indonesia, particularly in Gorontalo Province where volatility has increased in recent years. This study develops a machine learning-based forecasting framework using Decision Tree, Random Forest, and K-Nearest Neighbors (KNN) to estimate next-day retail prices. A harvest-season indicator was incorporated to capture agricultural seasonal patterns. Data preprocessing included feature engineering, data cleaning, exploratory analysis, and chronological splitting to maintain temporal order. Model performance was assessed using RMSE and MAPE. The optimized KNN model achieved the highest accuracy, with an RMSE of 96.76 and a MAPE of 0.4%, demonstrating its strength in capturing short-term price fluctuations. The integration of seasonal indicators further improved predictive performance compared to univariate approaches, offering practical value for supporting timely policy interventions. This study is limited by its narrow feature set and the absence of external drivers such as weather conditions, production shocks, and distribution disruptions. Future research may incorporate additional exogenous variables or explore deep learning and hybrid ensemble methods to enhance robustness and generalizability.