Prediction of Trends in Staple Food Food Price Changes Using Gaussian Naive Bayes Algorithm Based on Pihps Data From Bank Indonesia
Keywords:
Gaussian Naive Bayes; food prices; PIHPS; classification; price changes.Abstract
Staple food price fluctuations require continuous monitoring because price changes may affect market stability and consumers’ purchasing power. This study applies the Gaussian Naive Bayes algorithm to classify staple food price change trends using Bank Indonesia’s Strategic Food Price Information Center (PIHPS) data for the regional wholesale trader category. The uploaded dataset contains 21 detailed commodities and seven observation dates from 3. A total of 84 samples were constructed through historical price-change feature engineering. The predictors comprise the current-period percentage price change, the previous-period percentage price change, and the cumulative price change relative to the initial observation. The target classes are increasing, stable, and decreasing, defined by the price change in the subsequent observation period. A chronological split produced 63 training samples and 21 testing samples. The model achieved 95.24% accuracy, 33.33% macro-precision, 31.75% macro-recall, and 33.33% macro-F1. Although the accuracy appears high, all actual test observations belong to the stable class; therefore, the result does not demonstrate the model’s ability to identify increasing and decreasing prices. This is an initial experiment, and a longer observation period with more minority-class observations is required before operational use.
References
Bank Indonesia. (n.d.). Pusat Informasi Harga Pangan Strategis Nasional (PIHPS): Tabel harga pedagang besar daerah. https://www.bi.go.id/hargapangan/TabelHarga/PedagangBesarDaerah
Caruana, R., & Niculescu-Mizil, A. (2006). An empirical comparison of supervised learning algorithms. Proceedings of the 23rd International Conference on Machine Learning, 161–168. https://doi.org/10.1145/1143844.1143865
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., VanderPlas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, É. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.
Rish, I. (2001). An empirical study of the naive Bayes classifier. IJCAI 2001 Workshop on Empirical Methods in Artificial Intelligence, 41–46.
Zhang, H. (2006). The optimality of Naive Bayes. Proceedings of the Seventeenth International Florida Artificial Intelligence Research Society Conference, 562–567.
Novelan, M. S., & Aryza, S. (2025). Optimization CVRP with machine learning for improved classification of imbalanced data food distribution. Jurnal Informatika dan Teknologi Komputer, 10(4), 917–925. https://doi.org/10.33480/jitk.v10i4.6467
Aryza, S., Novelan, M. S., & Islam, M. R. (2025). A data-driven framework for integrating decision-making and operational efficiency in multi-product retail: A case study with experimental evaluation. Zero: Jurnal Sains, Matematika dan Terapan, 9(1), 140–149. https://doi.org/10.30829/zero.v9i1.24301
Aryza, S., Novelan, M. S., & Hutasuhut, P. F. (2026). Developing a data-driven IoT-based smart agriculture model for sustainable food security in Indonesia. Journal of Computer Science, Information Technology and Telecommunication Engineering, 7(2). https://jurnal.umsu.ac.id/index.php/jcositte/article/view/32345
Aryza, S., Novelan, M. S., & Islam, M. R. (2025). A data-driven framework for integrating decision-making and operational efficiency in multi-product retail: A case study with experimental evaluation. Zero: Jurnal Sains, Matematika dan Terapan, 9(1), 140–149. https://doi.org/10.30829/zero.v9i1.24301
Aryza, S., Novelan, M. S., & Hutasuhut, P. F. (2026). Developing a data-driven IoT-based smart agriculture model for sustainable food security in Indonesia. Journal of Computer Science, Information Technology and Telecommunication Engineering, 7(2). https://jurnal.umsu.ac.id/index.php/jcositte/article/view/32345
Aryza, S., Al Khowarizmi, M. F., Furqon, M., Lubis, Z., & Nasution, A. R. (2026). Explainable data-driven machine learning for identifying MBG program beneficiaries in Medan City. Journal of Computer Science, Information Technology and Telecommunication Engineering, 7(1), 1109–1118. https://jurnal.umsu.ac.id/index.php/jcositte/article/view/29560
Sitorus, Z., Karim, A., Nasyuha, A. H., & Aly, M. H. (2024). Implementation of MOORA and MOORSA methods in supporting computer lecturer selection decisions. INFOTEL, 16(3), 554–566. https://doi.org/10.20895/infotel.v16i3.1184
Sitorus, Z., Syahputra, I., Angkat, C. I., & Sartika, D. (2024). Implementation of K-Means clustering for inventory projection. International Journal of Science, Technology & Management, 5(3), 673–678. https://doi.org/10.46729/ijstm.v5i3.856
Sitorus, Z., Jabar, A. A., Indrayani, M., Barutu, S., & Situkkir, M. (2024). Analysis of user satisfaction in the development of ICT learning media using AR-based Assemblr Edu with the PIECES framework method. Journal of Information Technology, Computer Science and Electrical Engineering, 1(2), 110–120. https://doi.org/10.61306/jitcse.v1i2.56
Wahyudi, E., Wijaya, R. F., & Khairul. (2024). K-Means and Naive Bayes algorithms for evaluation of education personnel performance based on SPMI standards. Sinkron: Jurnal dan Penelitian Teknik Informatika, 8(3). https://doi.org/10.33395/sinkron.v8i3.13890
Marsya, A., Nasution, D., & Wijaya, R. F. (2025). Implementation of business intelligence to analyze opportunities to enter the most popular majors at SMKN 1 Tanjung Pura. Journal of Information Technology, Computer Science and Electrical Engineering, 2(2), 1–9. https://doi.org/10.61306/jitcse.v2i2.197
Wijaya, R. F., Syahputra, Z., Khairul, Purnama, I., & Hardinata, R. S. (2025). Strategi pengelolaan konten dengan search engine optimization pada website. Jurnal Komputer Teknologi Informasi Sistem Komputer (JUKTISI), 4(2), 1417–1422. https://doi.org/10.62712/juktisi.v4i2.680





