Meteorological Frost Prediction Using Ensemble Machine Learning Models With a Multi-Horizon Approach for Agroclimatic Early Warning in the Puno Altiplano, 2015–2024
Published 2026-08-28
Keywords
- machine learning,
- weather forecasting,
- frost,
- Peru,
- database
Copyright (c) 2026 Romel Gonzalo Quispe Valero

This work is licensed under a Creative Commons Attribution 4.0 International License.
How to Cite
Abstract
The predictive capacity of nine machine learning algorithms was evaluated for forecasting meteorological frosts at six weather stations in the Puno region (Peru) across three different time horizons (24, 48, and 72 h). In the second step, climate reanalysis data (ERA5-Land using the Open-Meteo API) from the period 2015–2024 were consolidated into 526,032 hourly records corresponding to 21,918 daily observations from up to 57 agroclimatic predictors. Frosts showed a regional average prevalence of 17.4%, exhibiting marked spatial heterogeneity ranging from 31.3% in Ilave to 7.7% in Puno, highlighting the regulatory role of Lake Titicaca’s temperature. A five-fold stratified cross-validation was performed to estimate the AUC-ROC, F1-score, accuracy, sensitivity, and Cohen’s kappa for model performance. The best overall performance was obtained using the voting ensemble, with an AUC-ROC of 0.957 and an F1-score of 0.744 at 24 h, corresponding to values of 0.913 and 0.656 at a 72 h cutoff time, respectively. Threshold optimization led to a regional F1-score improvement of +0.025 compared to the conventional threshold (t = 0.50). SHAP value analysis revealed that the driver with the greatest impact was the 3-day moving average minimum temperature (mean |SHAP| = 1.274). The developed model represents an objective early agroclimatic warning tool for crops in the Andean highlands.
References
- Arias, P. A., Garreaud, R., Poveda, G., Espinoza, J. C., Molina-Carpio, J., Masiokas, M., Viale, M., Scaff, L., & van Oevelen, P. J. (2021). Hydroclimate of the Andes Part II: Hydroclimate variability and sub-continental patterns. Frontiers in Earth Science, 8, 505467. https://doi.org/10.3389/feart.2020.505467
- Baño-Medina, J., Manzanas, R., & Gutiérrez, J. M. (2021). On the suitability of deep convolutional neural networks for continental-wide downscaling of climate change projections. Climate Dynamics, 57(11-12), 2941-2951. https://doi.org/10.1007/s00382-021-05847-0
- Benique-Olivera, E., & Ojeda-Tito, A. (2024). Impacto del cambio climático en la producción y rendimiento de quinua (Chenopodium quinoa Willd) en la provincia de Azángaro, región del Altiplano-Puno, Perú. Revista de Investigaciones Altoandinas, 26(3), 154-160. https://doi.org/10.18271/ria.2024.618
- Bentéjac, C., Csörgő, A., & Martínez-Muñoz, G. (2021). A comparative analysis of gradient boosting algorithms. Artificial Intelligence Review, 54(3), 1937-1967. https://doi.org/10.1007/s10462-020-09896-5
- Bi, K., Xie, L., Zhang, H., Chen, X., Gu, X., & Tian, Q. (2023). Accurate medium-range global weather forecasting with 3D neural networks. Nature, 619, 533-538. https://doi.org/10.1038/s41586-023-06185-3
- Chen, H., Covert, I. C., Lundberg, S. M., & Lee, S.-I. (2023). Algorithms to estimate Shapley value feature attributions. Nature Machine Intelligence, 5(6), 590-601. https://doi.org/10.1038/s42256-023-00657-x
- Dewitte, S., Cornelis, J. P., Müller, R., & Munteanu, A. (2021). Artificial intelligence revolutionises weather forecast, climate monitoring and decadal prediction. Remote Sensing, 13(16), 3209. https://doi.org/10.3390/rs13163209
- Díaz, L. B., & Vera, C. S. (2024). Extreme indices of temperature and precipitation in South America: trends and intercomparison of regional climate models. Climate Dynamics, 62(2), 1421-1439. https://doi.org/10.1007/s00382-022-06598-2
- Diedrichsen, E., Schmidhalter, U., & Trevisan, R. G. (2023). Prediction of frost events using machine learning and deep learning for smart agriculture. Computers and Electronics in Agriculture, 209, 107815. https://doi.org/10.1016/j.compag.2023.107815
- Grisel, O., Mueller, A., Lars, Gramfort, A., Louppe, G., Fan, T. J., Prettenhofer, P., Blondel, M., Niculae, V., Nothman, J., Joly, A., Lemaitre, G., Estève, L., Vanderplas, J., du Boisberranger, J., Kumar, M., Qin, H., Hug, N., Varoquaux, N., . . . Lorentzen, C. (2024). scikit-learn/scikit-learn: Scikit-learn 1.4.0 (Versión 1.4.0) [Software de computación]. Zenodo. https://doi.org/10.5281/zenodo.10532824
- Huerta, A., Aybar, C., & Lavado-Casimiro, W. (2023). PISCO temperature v1.2: a spatiotemporal reconstruction of air temperature for Peru. Earth System Science Data, 15(1), 345-365. https://doi.org/10.5194/essd-15-345-2023
- Junquas, C., Espinoza, J. C., Segura, H., Lucas-Picher, P., Boudin, M., Condom, T., & Lebel, T. (2022). Regional climate modeling of the diurnal cycle of precipitation and associated atmospheric circulation patterns over an Andean glacier region. Climate Dynamics, 58(9-10), 2873-2895. https://doi.org/10.1007/s00382-021-06079-y
- Kaur, H., Pannu, H. S., & Malhi, A. K. (2022). A systematic review on imbalanced data challenges in machine learning: Applications and solutions. ACM Computing Surveys, 52(4), 1-36. https://doi.org/10.1145/3505244
- Lam, R., Sanchez-Gonzalez, A., Willson, M., Wirnsberger, P., Fortunato, M., Alet, F., Ravuri, S., Ewalds, T., Eaton-Rosen, Z., Hu, W., Merose, A., Hoyer, S., Holland, G., Vinyals, O., Stott, J., Pritzel, A., Mohamed, S., & Battaglia, P. (2023). Learning skillful medium-range global weather forecasting. Science, 382(6677), 1416–1421. https://doi.org/10.1126/science.adi2336
- Lira, H., Martí, L., & Sanchez-Pi, N. (2022). A graph neural network with spatio-temporal attention for multi-sources time series data: An application to frost forecast. Sensors, 22(4), 1486. https://doi.org/10.3390/s22041486
- MINAGRI. (2021). Plan de gestión de riesgo agrario frente a heladas y friaje 2021-2030. Ministerio de Agricultura y Riego del Perú. https://www.midagri.gob.pe
- Muñoz-Sabater, J., Dutra, E., Agustí-Panareda, A., Albergel, C., Arduini, G., Balsamo, G., Boussetta, S., Choulga, M., Harrigan, S., Hersbach, H., Martens, B., Miralles, D. G., Piles, M., Rodríguez-Fernández, N. J., Zsoter, E., Buontempo, C., & Thépaut, J.-N. (2021). ERA5-Land: A state-of-the-art global reanalysis dataset for land applications. Earth System Science Data, 13(9), 4349–4383. https://doi.org/10.5194/essd-13-4349-2021
- Nguyen, T., Shah, R., Sharma, P., Vu, T., Nguyen, H., Burke, J., Bonfils, C., Entekhabi, D., & Bhattacharya, A. (2023). ClimaX: A foundation model for weather and climate. Proceedings of the 40th International Conference on Machine Learning (ICML 2023), PMLR 202, 25904-25938. https://doi.org/10.48550/arXiv.2301.10343
- Quispe-Mamani, J. F., Yucra-Quispe, L. F., Loza-Murguia, M., & Chipana-Cutipa, E. (2023). Climate variability and agricultural production in the Peruvian Altiplano: impacts on food security. Agriculture, 13(4), 847. https://doi.org/10.3390/agriculture13040847
- Rasp, S., Dueben, P. D., Scher, S., Weyn, J. A., Mouatadid, S., & Thuerey, N. (2024). WeatherBench 2: A benchmark for the next generation of data-driven global weather models. Journal of Advances in Modeling Earth Systems, 16(1), e2023MS004019. https://doi.org/10.1029/2023MS004019
- Rozante, J. R., Silveira Coelho, C. A., Silveira Pires, L., & Pillosu, F. M. (2023). Improved frost forecast using machine learning. Artificial Intelligence in Geosciences, 4, 100058. https://doi.org/10.1016/j.aiig.2023.10.001
- Schultz, M. G., Betancourt, C., Gong, B., Kleinert, F., Langguth, M., Leufen, L. H., Mozaffari, A., & Stadtler, S. (2021). Can deep learning beat numerical weather prediction? Philosophical Transactions of the Royal Society A, 379(2194), 20200097. https://doi.org/10.1098/rsta.2020.0097
- SENAMHI. (2023). Atlas de heladas del Perú. Servicio Nacional de Meteorología e Hidrología del Perú. https://www.senamhi.gob.pe
- Zippenfenig, P. (2023). Open-Meteo.com Weather API [software]. Zenodo. https://doi.org/10.5281/zenodo.7970649
