A Comparative Analysis of Hyperparameter-Tuned XGBoost and LightGBM for Multiclass Rainfall Classification in Jakarta - Pringandana, Cokorda Gde Lanang; Kusnawi , Kusnawi (Jurnal Teknik Informatika (Jutif), 2025)
The increasing frequency of extreme weather events in Jakarta has disrupted daily life and critical infrastructure, highlighting the urgent need for accurate rainfall prediction models to support disaster mitigation and early warning systems. This study aims to evaluate and compare the performance of two machine learning algorithms Extreme Gradient Boosting (XGBoost) and Light Gradient Boosting Machine (LightGBM) for multiclass rainfall classification using historical meteorological data. The dataset, which includes features such as temperature, humidity, wind speed, and rainfall, was preprocessed through mean imputation, oversampling to address class imbalance, one-hot encoding, and feature engineering. Both models were trained and tuned using RandomizedSearchCV and assessed through cross-validation and independent testing. The results show that XGBoost consistently outperformed LightGBM, achieving 94% accuracy compared to 91%. Furthermore, XGBoost demonstrated higher precision, recall, F1-score, and specificity across all rainfall categories, resulting in fewer misclassifications and more stable predictions. Confusion matrices confirmed its superior ability to distinguish between similar weather conditions such as cloudy and rainy classes. These findings indicate that XGBoost is more effective in capturing nonlinear interactions between weather features and is therefore better suited for use in complex tropical climates. The study concludes that XGBoost is the more reliable model and recommends its integration into real-time early warning systems to improve climate resilience and disaster preparedness in urban areas like Jakarta that are increasingly affected by climate variability.