Optimization of LSTM Model for Rainfall Prediction in Ambon City: Comparison of Mean Imputation and Interpolation in Time Series Data Prediction - Emanuella M. C. Wattimena; Pranaya D. M. Taihuttu; Devi V. Waas; Citra F Palembang; Victor E. Pattiradjawane (Tensor: Pure and Applied Mathematics Journal, 2025)
Rainfall prediction is an essential aspect of meteorology, agriculture, and disaster management, particularly in regions like Ambon, where rainfall patterns significantly impact daily life. However, one of the major challenges in developing an accurate predictive model is handling missing values in the dataset. This study aims to optimize the Long Short-Term Memory (LSTM) model for rainfall prediction in Ambon by comparing two missing value handling techniques: mean imputation and interpolation. The dataset used in this study consists of daily rainfall data from 2021 to 2024, with approximately 26.89% missing values. Two experimental scenarios were conducted: the first using mean imputation to fill in missing values with the average rainfall, and the second using linear interpolation. Both scenarios utilized the same LSTM architecture to evaluate their impact on model performance. The evaluation metrics used in this study include Root Mean Square Error (RMSE) and R-squared (R²). The results show that the interpolation-based model achieved a lower RMSE and a slightly higher R² value than the mean imputation-based model, indicating better predictive performance. However, both models struggled to capture extreme values, necessitating further improvements. To address this limitation, a more complex LSTM architecture was implemented in the subsequent experiments, incorporating additional layers and optimized hyperparameters. The findings suggest that choosing an appropriate missing value handling method significantly influences the predictive accuracy of LSTM models for rainfall forecasting. This research contributes to the development of more reliable weather prediction models, which can aid in agricultural planning, flood risk assessment, and climate change adaptation in Ambon.