Random forest model for forecasting vegetable prices: a case study in Nakhon Si Thammarat Province, Thailand

Sopee Kaewchada, Somporn Ruang-On, Uthai Kuhapong, Kritaphat Songsri-in


The objectives of this research were developing a model for forecasting vegetable prices in Nakhon Si Thammarat Province using random forest and comparing the forecast results of different crops. The information used in this paper were monthly climate data and average monthly vegetable prices collected between 2011 – 2020 from Nakhon Si Thammarat meteorological station and Nakhon Si Thammarat Provincial Commercial Office, respectively. We evaluated model performance based on mean absolute percentage error (MAPE), root mean squared error (RMSE), and mean absolute error (MAE). The experimental results showed that the random forest model was able to predict the prices of vegetables, including pumpkin, eggplant, and lentils with high accuracy with MAPE values of 0.09, 0.07, and 0.15, with RMSE values of 1.82, 1.46, and 2.33, and with MAE values of 3.32, 2.15, and 5.42, respectively. The forecast model derived from this research can be beneficial for vegetable planting planning in the Pak Phanang River Basin of Nakhon Si Thammarat Province, Thailand.


dataset; forecasting; machine learning; random forest model; vegetable price;

Full Text:


DOI: http://doi.org/10.11591/ijece.v13i5.pp5265-5272

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

International Journal of Electrical and Computer Engineering (IJECE)
p-ISSN 2088-8708, e-ISSN 2722-2578

This journal is published by the Institute of Advanced Engineering and Science (IAES) in collaboration with Intelektual Pustaka Media Utama (IPMU).