Implementation of Stacking Ensemble Learning on Decision Tree Regressor for Food Commodity Price Prediction in Indonesia
DOI:
https://doi.org/10.30871/jaic.v10i4.13092Keywords:
Decision Tree Regressor, Ensemble Learning, Temporal Split, Food Commodities, Food Price Prediction, StackingAbstract
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.
Downloads
References
[1] R. A. Chintia, R. Destiningsih, P. Studi, E. Pembangunan, U. Tidar, and K. Magelang, “Pengaruh harga komoditas pangan terhadap inflasi di kota semarang,” vol. 27, no. 2, pp. 244–258.
[2] O. Ilmandira, R. Farisi, N. Jannah, and R. Insania, “Prediksi Harga Komoditas Pangan di Indonesia Menggunakan Backpropagation,” vol. 3, no. 1, pp. 91–101, 2022.
[3] P. S. Agribisnis and U. J. Soedirman, “Pengaruh Fluktuasi Harga Cabai Rawit Merah Terhadap Inflasi di Kabupaten Banyumas,” vol. 10, no. 2020, pp. 1866–1877, 2024.
[4] A. R. Pratama, F. Wabula, H. Ilmandry, M. L. Isabela, and R. Sianipar, “Literature Review The Impact of Machine Learning in Modern Industries,” no. 2021, 2025.
[5] O. Sagi and L. Rokach, “Ensemble learning : A survey,” no. January, pp. 1–18, 2018, doi: 10.1002/widm.1249.
[6] A. N. Haya and M. Y. Ramme, “Penerapan Algoritma Stacking Ensemble Machine Learning Berbasis Pohon untuk Prediksi Penyakit Diabetes,” vol. 2024, no. Senada, pp. 954–961, 2024.
[7] I. M. Tirta, A. Riski, and N. Sholikhah, “Prediksi Harga Saham PT Bank Rakyat Indonesia Tbk Menggunakan AUTOML H2O Pendahuluan,” vol. 23, no. September, pp. 397–404, 2024.
[8] M. N. Hibatulloh, G. D. Prakoso, A. Dwi, P. Yunus, and T. D. Putra, “Prediksi Harga Rumah di Bandung 2024 Menggunakan Ensemble Learning : Analisis Komparatif dan Interpretabilitas,” vol. 10, no. 2, pp. 484–493, 2025, doi: 10.30591/jpit.v9ix.xxx.
[9] Badan Pangan Nasional, “Rata-rata Harga Pangan Bulanan Tingkat Konsumen Provinsi 2025.” [Online]. Available: https://data.badanpangan.go.id/datasetpublications/tq2/harga-pangan-tingkat-konsumen-provinsi
[10] J. Ilmu, T. Informasi, V. No, and J. Hal, “STUDI PERBANDINGAN ALGORITMA MACHINE LEARNING,” vol. 1, no. 1, pp. 22–28, 2026.
[11] A. Karim, B. Bangun, S. Prayetno, and M. Afrendi, “Optimasi Prediksi Harga Sawit Menggunakan Teknik Stacking Algoritma Machine Learning dan Deep Learning dengan SMOTE,” vol. 7, no. 1, pp. 638–645, 2025, doi: 10.47065/bits.v7i1.7239.
[12] K. Zhang, R. Xia, Y. Wang, Y. Chen, X. Wang, and J. Dou, “Stack Coupling Machine Learning Model Could Enhance the Accuracy in Short-Term Water Quality Prediction,” pp. 1–29, 2025.
[13] A. Agustina, T. Tukino, B. Huda, and E. Novalia, “Prediksi Volume Penjualan Gadget Berdasarkan Promo dan Channel Penjualan Menggunakan Random Forest,” vol. 4, no. 1, pp. 85–91, 2025.
[14] G. G. Ghiffary, N. T. Amanda, R. Ardhani, B. Sartono, A. Rizki, and S. S. Data, “Analisis Kinerja Model Stacking Berbasis Random Forest dan SVM dalam Klasifikasi Rumah Tangga Berdasarkan Garis Kemiskinan Makanan di Provinsi Jawa Barat,” vol. 5, no. 3, pp. 2244–2265, 2024.
[15] F. R. Salwa, M. Novita, and R. Renaldy, “Peningkatan Performa Prediksi Survival Pasien Gagal Jantung Menggunakan Stacking Ensemble Learning Improving Survival Prediction Performance of Heart Failure Patients Using Stacking Ensemble Learning,” no. 3, pp. 614–625, 2025, doi: 10.26798/jiko.v9i3.2126.
[16] R. A. Saputra, A. Pratama, S. Informasi, U. Nahdlatul, and U. Kalimantan, “Implementasi Decision Tree Untuk Prediksi Harga Rumah Di Daerah Tebet,” vol. 6, no. 2, pp. 4–10, 2025.
[17] I. Marina, D. Sukmawati, E. Juliana, and N. Safa, “Dinamika Pasar Komoditas Pangan Strategis : Analisis Fluktuasi Harga Dan Produksi,” vol. 12, no. 1, pp. 160–168, 2024.
[18] U. Royal, “Stacking Ensemble Model Machine Learning Deteksi Dini Risiko Kesehatan Mental Di Lingkungan Pendidikan,” vol. 4307, no. August, pp. 4256–4266, 2024.
[19] A. F. Nugraha, R. Faticha, A. Aziza, and Y. Pristyanto, “Penerapan metode Stacking dan Random Forest untuk Meningkatkan Kinerja Klasifikasi pada Proses Deteksi Web Phishing,” vol. 7, no. 1, 2022.
[20] A. S. Alfath and A. K. Wardhana, “Hypertension Risk Prediction Using Stacking Ensemble of CatBoost , XGBoost , and LightGBM : A Machine Learning Approach,” vol. 9, no. 6, pp. 3146–3156, 2025.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Nukman Solikhudin, Mega Novita, Ramadhan Renaldy

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).



