Published June 1, 2026 | Version v1

RainAI: A Hybrid 1DCNN-LSTM Model for Rainfall Prediction with KNN-Based Imputation

  • 1. Department of Information Technology, Institute of Technology and Business STIKOM Bali, Indonesia
  • 2. Department of Information Systems, Institute of Technology and Business STIKOM Bali, Indonesia
  • 3. Department of Mechatronics Engineering, Rajamangala University of Technology Thanyaburi, Thailand
  • 4. Department of Electrical Engineering, Politeknik Negeri Bali, Bali, Indonesia
  • 5. Department of Magister Information Systems, Institute of Technology and Business STIKOM Bali, Indonesia

Contributors

  • 1. Department of Information Technology, Institute of Technology and Business STIKOM Bali, Indonesia

Description

One crucial aspect of weather forecasting is rainfall prediction, which has a direct impact on agricultural planning and flood risk prevention. Therefore, this study aims to develop a rainfall prediction model by applying a RainAI is a hybrid One-Dimensional Convolutional Neural Network (1D-CNN) - Long Short-Term Memory (LSTM) model along with data preprocessing using K-Nearest Neighbor (KNN) imputation to handle missing values. The model was developed using meteorological datasets collected from Indonesia Meteorology, Climatology, and Geophysics Agency (BMKG). The dataset includes several weather parameters temperature, humidity, wind speed, wind direction, and sunlight duration recorded at daily intervals. In the modeling stage, two deep learning methods are employed: 1D-CNN for spatial feature extraction from time series data, and LSTM for capturing long-term sequential patterns. These are combined into a hybrid model for rainfall prediction. Experimental results using the 1D-CNN-LSTM hybrid model yielded an RMSE of 14.066 mm and MAE of 6.673 mm. Furthermore, testing the model for predicting average weekly rainfall resulted in RMSE of 9.915 mm and MAE of 5.273 mm. Additionally, evaluation of different window sizes showed that using 15 historical data points produced the best performance, with RMSE of 15.142 mm and MAE of 7.942 mm.

Notes

Published in Evergreen, Volume 13, Issue 02. Citation formats available via DOI link.

Files

p905-918.pdf

Files (3.0 MB)

Name Size Download all
md5:4f8b5f1c60b66a2f76b7ed9a3a312672
3.0 MB Preview Download

Additional details

Related works