Perbandingan Performa Algoritma Random Forest dan XGBoost dalam Memprediksi Hujan di Area Gunung Ungaran - Arizal Irsyad Imanullah; Ahmad Zainul Fanani (Universitas Budi Darma, 2026)
Hiking activities in Mount Ungaran are frequently hindered by extreme and unpredictable weather changes, which potentially endanger the safety of hikers. One of the primary challenges in developing an automated rainfall prediction model for this region is the class imbalance in historical meteorological data, where the number of non-rainy days significantly dominates rainfall events. This condition often causes machine learning models to become biased toward the majority class, leading to a failure in detecting actual rainfall events (false negatives). This study aims to address this issue through a comparative analysis of the performance of two popular ensemble algorithms, namely Random Forest and Extreme Gradient Boosting (XGBoost). Specifically, this research investigates the impact of applying the Synthetic Minority Oversampling Technique (SMOTE) to balance the training data distribution in order to enhance minority class detection accuracy. Using the ERA5 reanalysis daily dataset for the 2019–2023 period with input variables including temperature, humidity, air pressure, and wind speed, the models were trained and validated using a time-based split method with an 80:20 ratio. Performance evaluation was conducted comprehensively using accuracy, precision, recall, and F1-score metrics. The results provide strong empirical evidence that the application of SMOTE yields the most optimal impact on the XGBoost algorithm. The combined XGBoost-SMOTE model successfully achieved the best performance with an accuracy of 80.50% and an F1-score of 83.23%, outperforming the Random Forest model which remained at an accuracy of 78.21%. In conclusion, the integration of boosting methods with data resampling techniques proves to be highly effective in improving rainfall prediction reliability in regions with complex topography.