Perbandingan Hasil Peramalan XGBoost Tanpa Dan Dengan Optimisasi Hyperparameter Menggunakan Whale Optimization Algorithm Berbasis Recursive Feature Elimination with Cross-Validation (Studi Kasus: Data Curah Hujan Dasarian Kabupaten Pati)
Keywords:
XGBoost, Whale Optimization Algorithm, Recursive Feature Elimination with Cross-Validation, Peramalan Curah Hujan Dasarian, Kabupaten PatiAbstract
Pati Regency is one of Indonesia's major salt-producing regions, where production remains highly dependent on rainfall conditions. The wet dry-season phenomenon has increased uncertainty in production schedules, highlighting the need for accurate rainfall forecasting. This study aims to identify the most influential features, compare the performance of XGBoost models with and without hyperparameter optimization using the Whale Optimization Algorithm (WOA), and forecast ten-day rainfall in Pati Regency for the next six periods. The research began with feature engineering on historical ten-day rainfall data, followed by feature selection using Recursive Feature Elimination with Cross-Validation (RFECV). The selected features were used to develop both the baseline XGBoost model and the WOA-optimized XGBoost model. Model performance was evaluated using the Root Mean Square Error (RMSE). The optimal feature subset consisted of 12 features: lag 1, lag 2, lag 3, lag 5, lag 6, rolling mean 3, rolling mean 6, rolling standard deviation 6, rolling mean 9, rolling mean 18, rolling standard deviation 18, and the dasarian sine feature. The optimized XGBoost-WOA model achieved a lower RMSE (44.37) than the baseline XGBoost model (50.12). Forecasted rainfall for the next six ten-day periods was 12.65, 32.77, 33.23, 42.66, 48.25, and 48.25 mm per ten-day period, indicating that dry-season conditions remain favorable for salt production despite increasing rainfall toward the end of the forecast horizon. Therefore, XGBoost-WOA provides a promising alternative for ten-day rainfall forecasting to support salt production planning in Pati Regency.
References
Bahmani, M., Shawi, R. El, Potikyan, N., & Sakr, S. (2021). To tune or not to tune? An Approach for Recommending Important Hyperparameters. https://doi.org/10.1145/1122445.1122456
Balasubramaniam, T., Mohotti, W. A., Sabir, K., & Nayak, R. (2025). Feature engineering on climate data with machine learning to understand time-lagging effects in pasture yield prediction. Ecological Informatics, 86, 103011. https://doi.org/10.1016/J.ECOINF.2025.103011
BMKG. (2025). Curah Hujan. Badan Meteorologi, Klimatologi, dan Geofisika. https://gaw-bariri.bmkg.go.id/index.php/karya-tulis-dan-artikel/gawsarium/262-curah-hujan
Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 13-17-August-2016, 785–794. https://doi.org/10.1145/2939672.2939785;CSUBTYPE:STRING:CONFERENCE
Damayanti, H. O., Ernawati, A., Widhayoko, Astuti, A. D., & Aini, S. Q. (2025). Tata Kelola Usaha Garam Rakyat di Kabupaten Pati. In Penelitian. Sistem Informasi Riset dan Inovasi Daerah (SIRIDA) Kabupaten Pati. https://sirida.patikab.go.id/riset/bc16baaa-61df-4497-9e7e-015ec46363f9
Guyon, I., Weston, J., Barnhill, S., & Vapnik, V. (2002). Gene selection for cancer classification using support vector machines. Machine Learning, 46(1–3), 389–422. https://doi.org/10.1023/A:1012487302797/METRICS
Hanafi, U. (2025). Kemarau Basah, Produksi Garam di Pati Anjlok. https://berita.murianews.com/umar-hanafi/449702/kemarau-basah-produksi-garam-di-pati-anjlok
Hastie, T., Tibshirani, R., & Friedman, J. (2009). The Elements of Statistical Learning (2nd ed.). Springer. https://doi.org/10.1007/978-0-387-84858-7
Hutter, F., Kotthoff, L., & Vanschoren, J. (2019). Automated Machine Learning. In F. Hutter, L. Kotthoff, & J. Vanschoren (Eds.), Methods, Systems, Challenges. Springer. https://doi.org/10.1007/978-3-030-05318-5
Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679–688. https://doi.org/10.1016/J.IJFORECAST.2006.03.001
Joseph, M. (2022). Modern Time Series Forecasting with Python. Packt Publishing. https://www.oreilly.com/library/view/modern-time-series/9781803246802/
Joseph, S. B., Dada, E. G., Abidemi, A., Oyewola, D. O., & Khammas, B. M. (2022). Metaheuristic algorithms for PID controller parameters tuning: review, approaches and open problems. Heliyon, 8(5), e09399. https://doi.org/10.1016/J.HELIYON.2022.E09399
Kementerian Kelautan dan Perikanan. (2025). Produksi Garam. Pusat Data, Statistik, dan Informasi, Kementerian Kelautan dan Perikanan. https://portaldata.kkp.go.id/portals/data-statistik/prod_garam/summary
Khazem, S., & Kanso, H. (2025). Cyclical Temporal Encoding and Hybrid Deep Ensembles for Multistep Energy Forecasting. https://arxiv.org/pdf/2512.03656
Koller, D., & Sahami, M. (1996). Toward Optimal Feature Selection. Proceedings of the Thirteenth International Conference on Machine Learning, 284–292. https://dl.acm.org/doi/10.5555/3091696.3091731
Kong, X., Chen, Z., Liu, W., Ning, K., Zhang, L., Muhammad Marier, S., Liu, Y., Chen, Y., & Xia, F. (2025). Deep learning for time series forecasting: a survey. International Journal of Machine Learning and Cybernetics 2025 16:7, 16(7), 5079–5112. https://doi.org/10.1007/S13042-025-02560-W
Kumar, V., Kedam, N., Sharma, K. V., Khedher, K. M., & Alluqmani, A. E. (2023). A Comparison of Machine Learning Models for Predicting Rainfall in Urban Metropolitan Cities. Sustainability 2023, Vol. 15, Page 13724, 15(18), 13724. https://doi.org/10.3390/SU151813724
Kumari, P., Harshith, N., & Ginige, A. (2025). Integrating recursive feature selection with automated machine learning framework for global wheat price prediction. Journal of Agriculture and Food Research, 22, 102113. https://doi.org/10.1016/J.JAFR.2025.102113
Mirjalili, S., & Lewis, A. (2016). The Whale Optimization Algorithm. Advances in Engineering Software, 95, 51–67. https://doi.org/10.1016/J.ADVENGSOFT.2016.01.008
Mislan, & Dani, A. T. R. (2025). Navigating Samarinda’s climate: A comparative analysis of rainfall forecasting models. MethodsX, 14, 103080. https://doi.org/10.1016/J.MEX.2024.103080
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, É. (2011). Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12, 2825–2830. https://jmlr.org/papers/v12/pedregosa11a.html
Qiu, Y., Zhou, J., Khandelwal, M., Yang, H., Yang, P., & Li, C. (2021). Performance evaluation of hybrid WOA-XGBoost, GWO-XGBoost and BO-XGBoost models to predict blast-induced ground vibration. Engineering with Computers 2021 38:5, 38(5), 4145–4162. https://doi.org/10.1007/S00366-021-01393-9
Saputri, R. E. (2025). Prediksi Musim Kemarau Tahun 2025 di Indonesia (Pemutakhiran Mei 2025). Badan Meteorologi, Klimatologi, dan Geofisika. https://www.bmkg.go.id/iklim/prediksi-musim/prediksi-musim-kemarau-tahun-2025-di-indonesia-pemutakhiran-mei-2025-2
Sun, G., Shang, Y., Yuan, K., & Gao, H. (2022). An improved whale optimization algorithm based on nonlinear parameters and feedback mechanism. International Journal of Computational Intelligence Systems, 15, 38. https://doi.org/10.1007/s44196-022-00092-7
Willmott, C. J., & Matsuura, K. (2005). Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Climate Research, 30(1), 79–82. https://doi.org/10.3354/CR030079
Zahro, A. A. (2025). BMKG: Musim Kemarau Basah Diprediksi Hingga Oktober 2025, Waspada Bencana Hidrometeorologi. https://www.bmkg.go.id/berita/utama/bmkg-musim-kemarau-basah-diprediksi-hingga-oktober-2025-waspada-bencana-hidrometeorologi











