Drought is a significant climate change-driven extreme event that severely impacts agriculture and water resource management, particularly in regions like Pandeglang, Banten, which is vital for food security. This study aims to evaluate and compare the performance of four machine learning algorithms—Multiple Linear Regression (MLR), Artificial Neural Networks (ANN), K-Nearest Neighbors (KNN), and XGBoost (XGB)—in predicting the Standardized Precipitation Index (SPI) across short, medium, and long-term timescales (3, 6, 9, and 12 months). The methodology involves utilizing historical daily rainfall data (1991–2024) and executing a multi-scale comparative analysis using six different lag times within a Python-based framework. Performance was measured using RMSE, MAE, NSE, and R² metrics. The results demonstrate that predictive accuracy consistently improves as the SPI timescale increases, with the 12-month scale (SPI-12) offering the most stable results. The ANN model was the most reliable algorithm, with a peak R² of 0.961 at the 12-month scale. Conversely, the XGB model showed the poorest performance on shorter scales when historical data was limited. This research provides a localized, computationally efficient framework for informatics-based climate monitoring. By establishing optimal lag windows and model complexity requirements, it bridges the gap between algorithmic theory and practical application for developing data-driven early warning systems.
Copyrights © 2026