SISTEM PREDIKSI LONJAKAN HARGA PANGAN BERBASIS RANDOM FOREST UNTUK EARLY WARNING SYSTEM

Authors

  • Reihan Setya Banda Syah Putra Universitas Duta Bangsa Surakarta
  • Sopingi
  • Aprilisa Arum Sari

DOI:

https://doi.org/10.46880/mtk.v12i2.5656

Keywords:

Early Warning System, Price Spike, Random Forest, Feature Engineering, Time Series

Abstract

Food prices are essential indicators of economic stability and public welfare. Uncontrolled fluctuations, particularly sudden spikes, lower purchasing power and drive inflation. Currently, food price information systems are largely descriptive and lack predictive capabilities for sudden anomalies. To address this gap, this research develops a web-based Early Warning System (EWS) featuring digital integration and automation to proactively detect price spikes. The study utilizes daily secondary time-series data from the Strategic Food Price Information Center (PIHPS) via Kaggle, spanning from 2022 to 2026. Feature engineering, including 7-day moving averages and percentage changes, was applied to enhance the Random Forest classification algorithm. To handle the extreme 95:5 data imbalance, a class-weight balancing technique was employed during modeling. The empirical findings demonstrate that the model achieved an overall accuracy of 74% and a recall of 56% for the minority 'spike' class, proving its capability to capture more than half of the actual market crises. Furthermore, feature importance analysis revealed that the 7-day moving average was the most dominant predictor, contributing 26.22% to the model's decisions, which indicates the system effectively recognizes historical market volatility rather than nominal values. This prediction engine was successfully integrated into an interactive Laravel-based dashboard equipped with automated alert notifications. However, the system's high sensitivity resulted in a low precision of 9%, generating frequent false positive alerts that require further architectural refinement to mitigate alert fatigue in future studies.

References

M. S. Akbar, “KETAHANAN PANGAN INDONESIA DALAM PENCAPAIAN SDG 2 ( ZERO HUNGER ) KETAHANAN PANGAN INDONESIA DALAM PENCAPAIAN,” vol. 4, no. 2, 2026.

K. Auliasari, F. Qurrotuna, M. Orisa, and P. M. Mirenty, “Analisis Fluktuasi Harga Pangan Antar Provinsi di Indonesia Menggunakan Pendekatan Data Mining dan Big Data,” vol. 4, no. 2, pp. 1184–1191, 2024.

D. H. Ni Putu Erica Puspita Adriani, Roy Rudolf Huizen, “A Machine Learning-Based Approach for Retail Demand Forecasting : The Impact of Spending Score and Algorithm Optimization,” vol. 11, no. 2, pp. 169–183, 2025, doi: 10.26555/jiteki.v11i2.30630.

A. Zulfia, T. N. Ilfa, Z. Damia, T. S. A. Sukiman, and A. Karima, “AI Decision Support Using Random Forest for Demand Forecasting and Stock,” vol. 5, no. 2, pp. 800–805, 2025.

A. Muluk and A. Nugraha, “PENGEMBANGAN SISTEM PREDIKSI PERMINTAAN UNTUK,” vol. 01, 2025.

A. Rifai, A. Wulandari, and A. Hikmaturokhman, “Design and Implementation of a Machine Learning-Based Network Optimization Recommendation System with Web Performance Evaluation,” vol. 23, no. 2, pp. 76–91, 2025.

E. Najwa et al., “PENERAPAN MACHINE LEARNING UNTUK REKOMENDASI KONSUMSI MAKANAN SEHAT BERDASARKAN DATA GIZI PANGAN INDONESIA,” vol. 10, no. 1, pp. 341–348, 2026.

M. Isnaini et al., “Evaluasi Perbandingan Model XGBoost , Random Forest , LightGBM , dan Artificial Neural Network dalam Klasifikasi Kerawanan Pangan Evaluasi Perbandingan Model XGBoost , Random Forest , LightGBM , dan Artificial Neural Network dalam Klasifikasi Kerawanan Pangan,” vol. 14, no. 1, pp. 30–48, 2026.

A. Hura, T. Informasi, and U. Nias, “PENERAPAN MACHINE LEARNING UNTUK PREDIKSI PRODUKTIVITAS PERTANIAN BERBASIS DATA CUACA DI,” vol. 02, pp. 26–33, 2026.

R. Hidayat and A. Pratama, “Penerapan Analisis Data Deret Waktu untuk Peramalan Harga Komoditas Menggunakan Sistem Berbasis Web,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 7, no. 4, pp. 850–858, 2023, doi: 10.29207/resti.v7i4.5123.

H. Hafid, A. Arisandi, and R. W. Yanti, “Implementation of Random Forest Algorithm for Shallot Price Forecasting in Makassar City,” vol. 8, no. 2, pp. 400–407, 2025.

N. Hasanah and S. Riyadi, “Integrasi Data Mining pada Sistem Pendukung Keputusan Berbasis Web untuk Pemantauan Komoditas Pangan,” J. Rekayasa Perangkat Lunak dan Data Min., vol. 8, no. 1, pp. 67–78, 2024, doi: 10.25124/jrpdm.v8i1.4011.

D. A. Putri and S. Ramadhani, “Pengembangan Dashboard Monitoring Harga Pangan Real-Time Menggunakan Framework Laravel dan Filament,” J. Sist. Inf. dan Teknol., vol. 12, no. 3, pp. 310–322, 2024, doi: 10.35870/jsit.v12i3.5521.

K. R. Stifan, C. Fauzi, T. Informatika, and B. Lampung, “Perbandingan Algoritma Machine Learning untuk Prediksi Potensi Tsunami di Pesisir Barat Lampung,” pp. 2236–2246, 2025.

A. I. Putriani, “Analisis Spasial Kerentanan Tanah Longsor Melalui Pendekatan Algoritma Machine Learning,” pp. 157–169, 2026.

Downloads

Published

10-09-2026

How to Cite

[1]
R. S. B. S. . Putra, Sopingi, and Aprilisa Arum Sari, “SISTEM PREDIKSI LONJAKAN HARGA PANGAN BERBASIS RANDOM FOREST UNTUK EARLY WARNING SYSTEM”, METHODIKA, vol. 12, no. 2, pp. 8–15, Sep. 2026.