Machine Learning-Based Prediction of Cayenne Pepper Price Dynamics in Local Markets of East Lombok
DOI:
10.29303/jppipa.v12i7.15301Published:
2026-07-31Downloads
Abstract
Fluctuations in cayenne pepper prices in local markets are difficult to predict and often create uncertainty in farmers' decision-making. This study analyzes cayenne pepper price dynamics and develops a Random Forest-based prediction model using weekly price data (2021–2024) from four markets in East Lombok Regency: Pancor, Aikmel, Paok Motong, and Sakra. Predictor features included lagged prices (24 weeks), rolling mean and standard deviation (4-, 8-, and 12-week windows), and seasonal sine–cosine transformations. The dataset was split chronologically into training (80%) and testing (20%) sets to preserve temporal dependencies. The model achieved R² values of 0.86–0.93, with MAE of IDR 2,657–4,206 per kg and RMSE of IDR 3,519–4,946 per kg. It captured general price trends and seasonal patterns well but showed limited accuracy in predicting extreme price spikes, likely due to the inherent limitation of tree-based algorithms in extrapolating beyond historical training ranges and the absence of external variables such as supply volume. These findings indicate that cayenne pepper price dynamics follow learnable historical patterns, and the model has potential as a data-driven decision-support tool to help reduce, though not eliminate, market uncertainty and support local food security
Keywords:
Cayenne pepper Local market dynamics Price prediction Random forest Time series forecastingReferences
Amolegbe, K. B., Upton, J., Bageant, E., & Blom, S. (2021). Food Price Volatility and Household Food Security: Evidence from Nigeria. Food Policy, 102, 102061. https://doi.org/10.1016/j.foodpol.2021.102061
Anggarda, M., Kustiawan, I., Nurjanah, D., & Hakim, N. (2023). Pengembangan Sistem Prediksi Waktu Penyiraman Optimal pada Perkebunan: Pendekatan Machine Learning untuk Peningkatan Produktivitas Pertanian. Jurnal Budidaya Pertanian, 19(2), 124–136. https://doi.org/10.30598/jbdp.2023.19.2.124
Ardianto, N., Afandhi, A., & Sambah, A. B. (2025). High-Resolution Thermal Mapping for Urban Heat Mitigation: Random Forest Downscaling in a Rapid Urbanization Context (Case Study Malang City, Indonesia). Jurnal Penelitian Pendidikan IPA, 11(12), 1390–1401. https://doi.org/10.29303/jppipa.v11i12.13393
Aryoso, G. D., Kanata, B., & Yadnya, M. S. (2025). Rainfall Prediction Using Gate Recurrent Unit (GRU) for the Mataram City Area. Jurnal Penelitian Pendidikan IPA, 11(2), 1114–1119. https://doi.org/10.29303/jppipa.v11i2.9874
Athoriq, F. F., Tsani, A., & Triastutiningsih, E. (2026). Faktor-Faktor yang Mempengaruhi Produksi Cabai (Capsicum frutescens l.) Di Desa Cipetir Kecamatan Kadudampit Kabupaten Sukabumi. Jurnal Riset Rumpun Ilmu Tanaman, 5(1), 360–376. https://doi.org/10.55606/jurrit.v5i1.9622
Azizi, H. F., & Wibisonya, I. (2025). Analisis Faktor-Faktor yang Mempengaruhi Produksi Cabai Rawit di Desa Lembupurwo Kecamatan Mirit Kabupaten Kebumen. Journal of Applied Science and Information Technology (JASTECH), 25–37. https://doi.org/10.32639/ecm2p938
Bruns, S., Musshoff, O., & Ströhlein, P. (2022). Information Needs and Delivery Channels: Experimental Evidence from Cambodian Smallholders. IFLA Journal, 48(4), 661–678. https://doi.org/10.1177/03400352211057148
Chicco, D., Warrens, M. J., & Jurman, G. (2021). The Coefficient of Determination r-Squared is More Informative Than Smape, Mae, Mape, Mse and Rmse in Regression Analysis Evaluation. Peerj Computer Science, 7, e623. https://doi.org/10.7717/peerj-cs.623
Devianto, D., Wahyuni, E. S., Maiyastri, M., & Yollanda, M. (2024). The Seasonal Model of Chili Price Movement with the Effect of Long Memory and Exogenous Variables for Improving Time Series Model Accuracy. Frontiers in Applied Mathematics and Statistics, 10, 1408381. https://doi.org/10.3389/fams.2024.1408381
Dwinanda, I. G., Adelia, K. A. C., Wilda, R. W., Afli, F., Kaloka, T. P., & Pratiwie, D. L. (2024). Predictive Mapping of Hydrometeorological Disaster Prone Areas in Central Kalimantan. Jurnal Penelitian Pendidikan IPA, 10(2), 811–819. https://doi.org/10.29303/jppipa.v10i2.6238
Fu, Y. (2026). The Impact of Uncertainty Shocks on Agricultural Price Spillover Effects. Sage Open, 16(1), 1–16. https://doi.org/10.1177/21582440251414944
Hadi, N., & Benedict, J. (2024). Implementasi Machine Learning untuk Prediksi Harga Rumah Menggunakan Algoritma Random Forest. Computatio: Journal of Computer Science and Information Systems, 8(1), 50–61. https://doi.org/10.24912/computatio.v8i1.15173
Harjanto, S. A., Sa'adah, S., & Wulandari, G. S. (2022). Export Commodity Price Forecasting in Indonesia Using Decision Tree, Random Forest, and Long Short-Term Memory. Jurnal Ilmiah Teknik Elektro Komputer dan Informatika (JITEKI), 8(4), 660–669. https://doi.org/10.26555/jiteki.v8i4.25242
Harsanyi, E., Mirzaei, M., Arshad, S., Alsilibe, F., Vad, A., Nagy, A., Ratonyi, T., Gorji, M., Al-Dalahmeh, M., & Mohammed, S. (2024). Assessment of Advanced Machine and Deep Learning Approaches for Predicting CO₂ Emissions from Agricultural Lands: Insights Across Diverse Agroclimatic Zones. Earth Systems and Environment, 8, 1109–1125. https://doi.org/10.1007/s41748-024-00424-x
Helbawanti, O., Saputro, W. A., & Ulfa, A. N. (2021). Pengaruh Harga Bahan Pangan Terhadap Inflasi di Indonesia. Agrisaintifika: Jurnal Ilmu-Ilmu Pertanian, 5(2), 107–115. https://doi.org/10.32585/ags.v5i2.1859
Jeong, J. H., Resop, J. P., Mueller, N. D., Fleisher, D. H., Yun, K., Butler, E. E., Timlin, D. J., Shim, K.-M., Gerber, J. S., Reddy, V. R., & Kim, S.-H. (2016). Random Forests for Global and Regional Crop Yield Predictions. Plos One, 11(6), e0156571. https://doi.org/10.1371/journal.pone.0156571
Khaidir, K., Fadhliani, F., Wirda, Z., & Ramadhani, A. (2025). Model Prediksi Produksi Pertanian Berbasis Machine Learning dan Data Lapangan. SISFO: Jurnal Ilmiah Sistem Informasi, 9(2), 172–182. https://doi.org/10.29103/.v9i2.26015
Komaria, V., Maidah, N. E., & Furqon, M. A. (2023). Prediksi Harga Cabai Rawit di Provinsi Jawa Timur Menggunakan Metode Fuzzy Time Series Model Lee. KOMPUTIKA: Jurnal Sistem Komputer, 12(2), 157–167. https://doi.org/10.34010/komputika.v12i2.10644
Lestari, D. R., Bangun, E. A. S., Gaol, F. L., & Matsuo, T. (2025). Machine Learning-Based Forecasting of Agricultural Commodity Prices Using Ensemble Models. Journal of Human, Earth, and Future, 6(4), 887–897. https://doi.org/10.28991/hef-2025-06-04-09
Lubis, D. A., Irnawati, Y., Pamilih, A. T., & Gultom, R. F. B. (2026). Multimethodology Analysis of Determinants of Breast Cancer Diagnosis Machine Learning. Jurnal Penelitian Pendidikan IPA, 12(1), 949–969. https://doi.org/10.29303/jppipa.v12i1.12497
Maulita, I., Widiawati, C. R. A., & Wahid, A. M. (2024). Analisis Komparatif Linear Regression, Random Forest, dan Gradient Boosting untuk Prediksi Banjir. Jurnal Pendidikan dan Teknologi Indonesia, 4(8), 369–379. https://doi.org/10.52436/1.jpti.599
Meda, R. A., Purwanto, P., Zami, F. A., & Riyanto, A. (2025). Optimizing Stacked KNN, Naive Bayes, and LDA Models Using Random Forest as a Meta-Learner for Diabetes Classification. Jurnal Penelitian Pendidikan IPA, 11(10), 418–424. https://doi.org/10.29303/jppipa.v11i10.12546
Mustopa, A., Santoso, J. D., Nauvaldhi, M. S. F., & Wulandari, D. (2025). Pemodelan Variabilitas Musiman dalam Curah Hujan: Pendekatan Deret Waktu. Journal of Information System Management (JOISM), 6(2), 148–154. https://doi.org/10.24076/joism.2025v6i2.1936
Permana, J., Sujana, R. N., Komala, K. P., & Dwiyanto, B. (2026). Prediksi Harga Cabai Rawit Menggunakan LGBM, Random Forest, dan Xgboost. Jurnal Ilmu Komputer dan Sistem Informasi, 14(1). https://doi.org/10.24912/7nbfrp18
Porcelli, L., Fiore, U., & Palmieri, F. (2025). Generative Models with Helical Time Encoding for Seasonal Time Series Forecasting. Engineering Applications of Artificial Intelligence. https://doi.org/10.1016/j.engappai.2025.112780
Putra, I. M. G. A. B., & Suhartana, I. K. G. (2025). Implementasi Algoritma Random Forest Regression dalam Sistem Prediksi Harga Rumah di Jabodetabek. Jurnal Nasional Teknologi Informasi dan Aplikasinya, 4(1), 27–36. https://doi.org/10.24843/jnatia.2025.v04.i01.p04
Putri, I. R. A. S., Harianto, H., & Rosiana, N. (2025a). Disparitas Harga Cabai Rawit (Capsicum frutescens L.) Antar Waktu dan Antar Wilayah di Indonesia. Jurnal Agribisnis Indonesia, 13(2), 333–349. https://doi.org/10.29244/jai.2025.13.2.333-349
Putri, M. R. N., Kertanah, K., Bustari, M., Aminuddin, M., & Khotimah, B. H. (2025b). Parental Income and Education as Predictors of Physics Exam Success: A Neural Network and Random Forest Regression Analysis. Jurnal Penelitian Pendidikan IPA, 11(10), 581–588. https://doi.org/10.29303/jppipa.v11i10.12307
Rachmawati, N., & Soegianto, A. (2025). Uji Keragaman Genetik pada Tanaman Cabai Rawit (Capsicum frutescens L.). PLANTROPICA: Journal of Agricultural Science, 10(1), 87–93. Https://doi.org/10.21776/ub.jpt.2025.010.1.9
Rahayu, I. P., Wijayanto, H., & Husodo, A. Y. (2026). Multi-Criteria Decision Making in Kip-K Scholarship Selection Using Ahp, Topsis, and Skyline Query. Jurnal Penelitian Pendidikan IPA, 11(12), 1292–1303. https://doi.org/10.29303/jppipa.v11i12.12032
Rahmanta, R., Ayu, S. F., Fadhilah, E. F., & Sitorus, R. S. (2020). Pengaruh Fluktuasi Harga Komoditas Pangan Terhadap Inflasi di Provinsi Sumatera Utara. Agrica (Jurnal Agribisnis Sumatera Utara), 13(2), 81–92. https://doi.org/10.31289/agrica/v12i2.4063
Ruslan, J. A., Mutolib, A., Bahar, R. R., & Salam, R. (2024). Perilaku Pasar Komoditas Inflasi dan Faktor Penentunya di Kota Tasikmalaya. Jurnal Agrimansion, 25(1), 141–149. https://doi.org/10.29303/agrimansion.v25i1.1601
Salsabila, M., Adiwijaya, R. P., & Octavia, L. N. (2025). Implementasi Machine Learning untuk Memprediksi Harga Rumah dengan Menggunakan Metode Decision Tree Regressor dan Random Forest Regressor. Jurnal Ilmiah Setrum, 14(1), 46–56. https://doi.org/10.62870/setrum.v14i1.31025
Subangkit, H. S., Hariguna, T., & Saputra, D. I. S. (2026). Lecturer Performance Prediction Based on Student Evaluation Data Using a Hybrid K-Means and Random Forest Model. Jurnal Penelitian Pendidikan IPA, 12(1), 352–358. https://doi.org/10.29303/jppipa.v12i1.14163
Sun, C., Pei, M., Cao, B., Chang, S., & Si, H. (2024). A Study on Agricultural Commodity Price Prediction Model Based on Secondary Decomposition and Long Short-Term Memory Network. Agriculture, 14(1), 60. https://doi.org/10.3390/agriculture14010060
Wibowo, M. H. S., Ayubi, M. D. A., & Rilvani, E. (2025). Klasifikasi Volatilitas Harga Daging Ayam dan Cabe Rawit Merah dengan Decision Tree. Jurnal Komputer dan Teknologi (JUKOMTEK), 4(2), 138–153. https://doi.org/10.58290/jukomtek.v4i2.455
Yasper, A., Handoko, D., Putra, M., Aliwarga, H. K., & Rosid, M. S. (2023). Hyperparameters Optimization in Xgboost Model for Rainfall Estimation: A Case Study in Pontianak City. Jurnal Penelitian Pendidikan IPA, 9(9), 7113–7121. https://doi.org/10.29303/jppipa.v9i9.3890
Yustitia, C., & Charibaldi, N. (2024). Chili Price Prediction One Year Ahead Using the Gated Recurrent Unit Method. INFORM: Jurnal Ilmiah Bidang Teknologi Informasi dan Komunikasi, 10(1), 1–7. https://doi.org/10.25139/inform.v10i1.8269
Zaini, A. Z. A., Vonnisa, M., Marzuki, M., & Ramadhan, R. (2023). Seasonal Variation of Rainfall in Indonesia Under Normal Conditions Without ENSO and IOD Events from 1981-2021. Jurnal Penelitian Pendidikan IPA, 9(11), 9899–9909. https://doi.org/10.29303/jppipa.v9i11.4569
License
Copyright (c) 2026 Wardatul Aeni, Elisa Anggraeni, Hartrisari Hardjomidjojo

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with Jurnal Penelitian Pendidikan IPA, 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 4.0 International License (CC-BY License). This license allows authors to use all articles, data sets, graphics, and appendices in data mining applications, search engines, web sites, blogs, and other platforms by providing an appropriate reference. The journal allows the author(s) to hold the copyright without restrictions and will retain publishing rights without restrictions.
- 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 acknowledgment of its initial publication in Jurnal Penelitian Pendidikan IPA.
- 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).

