Jurnal Riset dan Aplikasi Mahasiswa Informatika (JRAMI)
Vol. 7 No. 03 (2026): Jurnal Riset dan Aplikasi Mahasiswa Informatika (JRAMI)

Prediksi Harga Komoditas Hortikultura Pangan Strategis Menggunakan Random Forest dengan Analisis SHAP

Valencia Patrice Gracia Pangaribuan (Universitas Esa Unggul)
Bayu Sulistiyanto Ipung Sutejo (Universitas Esa Unggul)
Gerry Firmansyah (Universitas Esa Unggul)
Arief Ichwani (Universitas Esa Unggul)



Article Info

Publish Date
15 Jul 2026

Abstract

Price fluctuations in strategic horticultural food commodities can affect food and economic stability. This study aims to predict the prices of shallots, garlic, red chilies, and bird’s eye chilies in Central Java Province using Random Forest Regression based on historical prices and climate variables, and to interpret climate variable contributions using Shapley Additive Explanations (SHAP). Price data were obtained from the National Strategic Food Price Information Center (PIHPS), while climate data were collected from four BMKG stations during 2018–2025. The model used 16 features, including historical prices, average temperature (TAVG), average humidity (RH_AVG), rainfall (RR), rolling features, and calendar variables. Evaluation was conducted using MAE, RMSE, and MAPE at H+1, H+7, and H+30 forecasting horizons. The results show that the best performance was achieved for garlic price prediction at H+1, with a MAPE of 1.69%, while the highest error occurred for red chili at H+30, with a MAPE of 26.72%. SHAP analysis shows that TAVG was dominant in chili commodities, while RR and RH_AVG had greater influence on shallots and garlic. These findings indicate that Random Forest and SHAP can support short-term price prediction with interpretable climate variable contributions.

Copyrights © 2026






Journal Info

Abbrev

jrami

Publisher

Subject

Description

JRAMI merupakan media publikasi online khusus bagi mahasiswa/i baik didalam Program Studi Informatika, Fakultas Teknik dan Ilmu Komputer, Universitas Indraprasta PGRI ataupun luar institusi. Setiap mahasiswa/i yang memiliki hasil riset dari PKM (Program Kreatifitas Mahasiswa) dan atau Tugas Akhir ...