Activation function impact on rainfall prediction: comparative insights across ML and DL architectures
摘要
Rainfall prediction is critical in agriculture, water resource management, transportation, and disaster planning. As a critical component of the hydrological cycle, precisely forecasting daily rainfall helps to lessen the effects of floods, droughts, and other extreme weather events. However, due to the nonlinear and complicated interaction of meteorological factors, daily rainfall forecast remains a grim problem. The proposed work adopts a systematic deep learning-based framework, integrating Long Short-Term Memory (LSTM) and Bidirectional LSTM (BiLSTM) models and Transformers to predict the rainfall of the next day. Besides deep models, a few machine learning classifiers, such as the Logistic Regression (LR), Support Vector Machines (SVM), and the K-Nearest Neighbor (KNN) will be applied to benchmark the performance.One of the main insights in this study is the systematic comparison of a wide variety of activation functions, such as Sigmoid, ReLU, Tanh, Swish, Leaky ReLU, and ELU to measure their effects on model accuracy, convergence, and generalization performance. An experiment was employed on real-life rainfall of the USA dataset, which proved the efficiency of using the BiLSTM model and ReLU and Leaky ReLU activation functions to achieve up to 99% accuracy, whereas Transformer model was also efficient as it obtain up to 98%, but it was not stable and showed a tendency towards occasional instability during the training process. On the contrary, traditional machine learning models displayed an intermediate predictive accuracy, with average accuracies of approximately 87%. Significantly, the results were validated through multi-seed experiments with confidence intervals and baseline benchmarks, demonstrating that the near-perfect scores were not incidental but consistently stable across different initializations. This study provides a new theoretical standpoint in terms of activation functions in deep sequence models as it studies beneficiaries and shortcomings through a mathematical point of view. The results highlight that activation function selection can have an important impact on the accuracy of forecasts and can be significant in building more accurate, scalable, and general learning subroutines in weather predictions.