Rainfall is an important meteorological parameter across various sectors and exhibits complex nonlinear characteristics, requiring reliable forecasting methods. This study aims to compare the performance of three machine learning algorithms—k-Nearest Neighbors (kNN), Random Forest (RF), and Artificial Neural Networks (ANN)—for monthly rainfall forecasting at the Depati Amir Meteorological Station, Pangkalpinang, using data from 2015 to 2024. The predictor variables included rainfall, mean air temperature, relative humidity, sunshine duration, and rainfall lag features. The modeling process consisted of data preprocessing, feature engineering, hyperparameter optimization using Time Series Cross-Validation, and model evaluation based on Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and the coefficient of determination (R²). The results indicate that the Random Forest model achieved the best predictive performance (MAE = 75.73 mm, RMSE = 89.50 mm, R² = 0.605), followed by kNN (R² = 0.492) and ANN (R² = 0.303). These findings demonstrate that Random Forest is more effective than the other two algorithms for monthly rainfall forecasting in the study area.
No takes yet. Share an insight, caveat, or question.
Maulana et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: