Rainfall prediction is important for supporting hydrometeorological disaster mitigation and data-based decision making. This study aims to model monthly rainfall prediction using Long Short-Term Memory (LSTM) based on time series data in North Sumatra Province, with monthly weather data from Medan City as the study case. The data used cover the period from 2010 to 2025 and include rainfall, rainy days, temperature, humidity, wind speed, and air pressure. The research stages consist of data validation, exploratory data analysis, threshold determination for high rainfall, feature engineering, chronological data splitting, scaling, LSTM model training, baseline comparison, backtesting, cross validation, and rainfall prediction for 2026-2027. The best LSTM configuration used 64 units, dropout 0.1, learning rate 0.0005, batch size 8, and weighted MSE loss function. Evaluation on the 2025 test set produced MAE of 75.30 mm, RMSE of 89.34 mm, MAPE of 64.23%, and R2 of 0.3703. The LSTM model outperformed the baseline models based on MAE, RMSE, and R2. Forecast results indicate higher rainfall tendencies at the end of 2026 and 2027, especially in October, November, and December.
Copyrights © 2026