Comparison of Random Forest and LSTM Methods for Temperature Prediction
Main Article Content
Abstract
This study compares the performance of Long Short-Term Memory (LSTM) and Random Forest (RF) models in predicting temperature data from Tanjung Priok, Indonesia, using evaluation metrics such as RMSE, MAE, and R² Score. The LSTM model demonstrated its ability to capture temporal dependencies and temperature trends, achieving an R² score of 0.4493 and an MAE of 0.5863. In contrast, the RF model performed better in minimizing prediction errors, with a lower RMSE of 0.6498 and an R² score of 0.4066. While the LSTM model excelled in explaining variance in the temperature data, the RF model was more effective in stable periods, exhibiting lower prediction errors. The results highlight that both models have distinct advantages, with LSTM better suited for capturing long-term temperature trends and RF performing well during periods of stability. Future research could explore hybrid models or further optimization of these techniques to improve prediction accuracy, particularly for dynamic and extreme temperature fluctuations.
Downloads
References
E. De Saa and L. Ranathunga, “Comparison between ARIMA and Deep Learning Models for Temperature Forecasting,” 2020, [Online]. Available: http://arxiv.org/abs/2011.04452
M. Asamoah-Boaheng, “Using SARIMA to Forecast Monthly Mean Surface Air Temperature in the Ashanti Region of Ghana Using Seasonal Autoregressive Integrated Moving Average (SARIMA) model, the study determined an adequate forecasting model for the mean temperature of Ashanti Reg,” Int. J. Stat. Appl., vol. 4, no. 6, pp. 292–299, 2014, doi: 10.5923/j.statistics.20140406.06.
M. Yu, F. Xu, W. Hu, J. Sun, and G. Cervone, “Using Long Short-Term Memory (LSTM) and Internet of Things (IoT) for Localized Surface Temperature Forecasting in an Urban Environment,” IEEE Access, vol. 9, pp. 137406–137418, 2021, doi: 10.1109/ACCESS.2021.3116809.
D. Fister, J. Pérez-Aracil, C. Peláez-Rodríguez, J. Del Ser, and S. Salcedo-Sanz, “Accurate long-term air temperature prediction with Machine Learning models and data reduction techniques,” Appl. Soft Comput., vol. 136, p. 110118, 2023, doi: 10.1016/j.asoc.2023.110118.
J. Cifuentes, G. Marulanda, A. Bello, and J. Reneses, “Air temperature forecasting using machine learning techniques: A review,” Energies, vol. 13, no. 6, pp. 1–28, 2020, doi: 10.3390/en13164215.
B. Mahesh, “Machine Learning Algorithms - A Review,” Int. J. Sci. Res., vol. 9, no. 1, pp. 381–386, 2020, doi: 10.21275/art20203995.
D. Gente, “P-issn 2244-4432 e-issn 2984-7125,” vol. 14, pp. 73–83, 2023.
A. A. Akbar, Y. Darmawan, A. Wibowo, and H. K. Rahmat, “Accuracy Assessment of Monthly Rainfall Predictions using Seasonal ARIMA and Long Short-Term Memory ( LSTM ),” vol. 5, no. 2, pp. 99–114, 2024.
M. Elsaraiti and A. Merabet, “A comparative analysis of the arima and lstm predictive models and their effectiveness for predicting wind speed,” Energies, vol. 14, no. 20, 2021, doi: 10.3390/en14206782.
J. Lu, G. Li, S. S. R. Moustafa, and S. S. Khodairy, “A comparison of SARIMA and LSTM in forecasting dengue hemorrhagic fever incidence in Jambi, Indonesia”, doi: 10.1088/1742-6596/1566/1/012054.
S. Khedhiri, “Comparison of SARFIMA and LSTM methods to model and to forecast Canadian temperature,” Reg. Stat., vol. 12, no. 2, pp. 177–194, 2022, doi: 10.15196/RS120204.
A. K. Wardhana, Y. Riwanto, and B. W. Rauf, “Performance Comparison Analysis on Weather Prediction using LSTM and TKAN,” vol. 04, pp. 3–10, 2024, doi: 10.31763/iota.v4i3.808.
R. Meenal, P. A. Michael, D. Pamela, and E. Rajasekaran, “Weather prediction using random forest machine learning model,” Indones. J. Electr. Eng. Comput. Sci., vol. 22, no. 2, pp. 1208–1215, 2021, doi: 10.11591/ijeecs.v22.i2.pp1208-1215.
W. Y. N. Naing and Z. Z. Htike, “Forecasting of monthly temperature variations using random forests,” ARPN J. Eng. Appl. Sci., vol. 10, no. 21, pp. 10109–10112, 2015.
X. Wang, “Ladle furnace temperature prediction model based on large-scale data with random forest,” IEEE/CAA J. Autom. Sin., vol. 4, no. 4, pp. 770–774, 2017, doi: 10.1109/JAS.2016.7510247.
S. Kendzierski, B. Czernecki, L. Kolendowicz, and A. Jaczewski, “Air temperature forecasts’ accuracy of selected short-term and long-term numerical weather prediction models over Poland,” Geofizika, vol. 35, no. 1, pp. 19–37, 2018, doi: 10.15233/gfz.2018.35.5.
B. Azari, K. Hassan, J. Pierce, and S. Ebrahimi, “Evaluation of Machine Learning Methods Application in Temperature Prediction,” Comput. Res. Prog. Appl. Sci. Eng., vol. 8, no. 1, pp. 1–12, 2022, doi: 10.52547/crpase.8.1.2747.
D. Chicco, M. J. Warrens, and G. Jurman, “The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation,” PeerJ Comput. Sci., vol. 7, pp. 1–24, 2021, doi: 10.7717/PEERJ-CS.623.
A. V Tatachar, “Comparative assessment of regression models based On model evaluation metrics,” Int. Res. J. Eng. Technol., vol. 8, no. 9, pp. 853–860, 2021, [Online]. Available: https://d1wqtxts1xzle7.cloudfront.net/73250877/IRJET_V8I9127-libre.pdf
Doreswamy, K. S. Harishkumar, Y. Km, and I. Gad, “Forecasting Air Pollution Particulate Matter (PM2.5) Using Machine Learning Regression Models,” Procedia Comput. Sci., vol. 171, no. 2019, pp. 2057–2066, 2020, doi: 10.1016/j.procs.2020.04.221.
A. Ahmad, K. A. Ostrowski, M. Maślak, F. Farooq, I. Mehmood, and A. Nafees, “Comparative study of supervised machine learning algorithms for predicting the compressive strength of concrete at high temperature,” Materials (Basel)., vol. 14, no. 15, 2021, doi: 10.3390/ma14154222.
R. M. Adnan et al., “Air temperature prediction using different machine learning models,” Indones. J. Electr. Eng. Comput. Sci., vol. 22, no. 1, pp. 534–541, 2021, doi: 10.11591/ijeecs.v22.i1.pp534-541.