Evaluation of G-Xgboost Model Performance on Data with Different Levels of Heterogeneity Spatial and Linearity Patterns

Zamrah Mutmainah, Budi Susetyo, Septian Rahardiantoro

Abstract


Spatial data analysis often faces challenges arising from spatial heterogeneity and nonlinear relationships among variables. Conventional methods, such as Ordinary Least Squares (OLS) and Geographically Weighted Regression (GWR), are limited in capturing complex nonlinear patterns, while machine learning approaches, such as XGBoost, do not explicitly account for spatial variation. To address these limitations, Geographical-XGBoost (G-XGBoost) was developed by directly incorporating spatial information into the XGBoost learning process. This study evaluates the performance of G-XGBoost against OLS, GWR, XGBoost, and Geographically Weighted XGBoost (GW-XGBoost) through a simulation study using data generated at 119 locations on Java Island. Each observation included two predictor variables drawn from a standard normal distribution, with response variables generated through linear combinations or hyperbolic tangent (tanh) transformations of spatially varying coefficients. Four scenarios were constructed by combining two levels of relationship linearity (linear and nonlinear) and spatial heterogeneity (low and high), yielding coefficient patterns ranging from smooth gradients to highly dynamic local fluctuations. Model evaluation was based on 100 replications using independently generated training and testing datasets, assessed via R^2, RMSE, MAE, and the training–testing performance gap as a measure of generalization stability. Under linear scenarios, GWR achieved the highest R² values on the test data (up to 0.94 and 0.92, respectively) with the lowest error metrics. In nonlinear scenarios, tree-based methods outperformed regression-based approaches, with GW-XGBoost achieving the highest test R^2 values of up to 0.89 and 0.85. Although G-XGBoost did not always achieve the highest predictive accuracy, it consistently produced training–testing R² gaps centered near zero across all scenarios, with an interquartile range of approximately −0.05 to 0.05, the narrowest among all competing methods, indicating more stable generalization and greater resistance to overfitting across varying levels of linearity and spatial heterogeneity.

Keywords


G-XGBoost; GW-XGBoost; Simulation; Spatial Heterogenity.

Full Text:

DOWNLOAD [PDF]

References


Anselin, L. (2022). Spatial econometrics. Handbook of Spatial Analysis in the Social Sciences, 101–122. https://doi.org/10.4337/9781789903942.00014

Burt, D. R., Shen, Y., & Broderick, T. (2025). Consistent Validation for Predictive Methods in Spatial Settings. Proceedings of Machine Learning Research, 258, 820–828. https://doi.org/10.48550/arXiv.2402.03527

Chen, M., Liu, Y., Grekousis, G., & Dong, G. (2026). Nonlinear and spatially heterogenous effects of air pollution and greenspace exposure on chronic respiratory disease mortality in Guangzhou, China: A Geographical-XGBoost approach. Health & Place, 100, 103689. https://doi.org/https://doi.org/10.1016/j.healthplace.2026.103689

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-Augu, 785–794. https://doi.org/10.1145/2939672.2939785

Chicco, D., Warrens, M. J., & Jurman, G. (2021). The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Computer Science, 7, 1–24. https://doi.org/10.7717/PEERJ-CS.623

Comber, A., Brunsdon, C., Charlton, M., Dong, G., Harris, R., Lu, B., Lü, Y., Murakami, D., Nakaya, T., Wang, Y., & Harris, P. (2020). The GWR route map: a guide to the informed application of Geographically Weighted Regression. 1–34. https://doi.org/10.48550/arXiv.2004.06070

Comber, A., Harris, P., & Brunsdon, C. (2024). Multiscale spatially varying coefficient modelling using a Geographical Gaussian Process GAM. International Journal of Geographical Information Science, 38(1), 27–47. https://doi.org/10.1080/13658816.2023.2270285

Goodfellow, I., Bengio, Y., Courville, A., & Bengio, Y. (2016). Deep learning (Vol. 1, Number 2). MIT press Cambridge.

Grekousis, G. (2025). Geographical-XGBoost: a new ensemble model for spatially local regression based on gradient-boosted trees. Journal of Geographical Systems, 27(2), 169–195. https://doi.org/10.1007/s10109-025-00465-4

Guan, X., & Burton, H. (2022). Bias-variance tradeoff in machine learning: Theoretical formulation and implications to structural engineering applications. Structures, 46, 17–30. https://doi.org/https://doi.org/10.1016/j.istruc.2022.10.004

Hagenauer, J., & Helbich, M. (2022). A geographically weighted artificial neural network. International Journal of Geographical Information Science, 36(2), 215–235. https://doi.org/10.1080/13658816.2021.1871618

Han, Y., Yin, J., Zhu, D., Tan, J., Zhao, Y., Liu, W., & Mu, Y. (2026). Geographical-XGBoost and SHAP reveal ecosystem service supply-demand responses to landscape patterns in karst regions. Journal of Environmental Management, 404, 129550. https://doi.org/https://doi.org/10.1016/j.jenvman.2026.129550

Kattenborn, T., Schiefer, F., Frey, J., Feilhauer, H., Mahecha, M. D., & Dormann, C. F. (2022). Spatially autocorrelated training and validation samples inflate performance assessment of convolutional neural networks. ISPRS Open Journal of Photogrammetry and Remote Sensing, 5(June), 100018. https://doi.org/10.1016/j.ophoto.2022.100018

Khosravi, Y., & Ouarda, T. B. M. J. (2026). A geographically weighted XGBoost framework for Pixel-Level modeling of vegetation responses using Multi-Source Earth Observation data. ISPRS Journal of Photogrammetry and Remote Sensing, 235(March), 105–132. https://doi.org/10.1016/j.isprsjprs.2026.03.006

Lessani, M. N., & Li, Z. (2024). SGWR: similarity and geographically weighted regression. International Journal of Geographical Information Science, 38(7), 1232–1255. https://doi.org/10.1080/13658816.2024.2342319

Rimal, Y., Sharma, N., & Alsadoon, A. (2024). The accuracy of machine learning models relies on hyperparameter tuning: student result classification using random forest, randomized search, grid search, bayesian, genetic, and optuna algorithms. Multimedia Tools and Applications, 83(30), 74349–74364. https://doi.org/10.1007/s11042-024-18426-2

Salman, H. A., Kalakech, A., & Steiti, A. (2024). Random Forest Algorithm Overview. Babylonian Journal of Machine Learning, 2024, 69–79. https://doi.org/10.58496/BJML/2024/007

Schimohr, K., Doebler, P., & Scheiner, J. (2023). Prediction of Bike-sharing Trip Counts: Comparing Parametric Spatial Regression Models to a Geographically Weighted XGBoost Algorithm. Geographical Analysis, 55(4), 651–684. https://doi.org/10.1111/gean.12354

Suprayogi, M. A., Sartono, B., & Notodiputro, K. A. (2024). Geographically Weighted Machine Learning Model for Addressing Spatial Heterogeneity of Public Health Development Index in Java Island. Barekeng, 18(4), 2577–2588. https://doi.org/10.30598/barekengvol18iss4pp2577-2588

Wang, H., Huang, Z., Yin, G., Bao, Y., Zhou, X., & Gao, Y. (2022). Gwrboost: a geographically weighted gradient boosting method for explainable quantification of spatially-varying relationships. https://doi.org/10.48550/arXiv.2212.05814

Wang, J., Du, H., Li, X., Mao, F., Zhang, M., Liu, E., Ji, J., & Kang, F. (2021). Remote sensing estimation of bamboo forest aboveground biomass based on geographically weighted regression. Remote Sensing, 13(15), 1–18. https://doi.org/10.3390/rs13152962

Wang, Z., Zhao, Y., & Zhang, F. (2022). Simulating the Spatial Heterogeneity of Housing Prices in Wuhan, China, by Regionally Geographically Weighted Regression. ISPRS International Journal of Geo-Information, 11(2). https://doi.org/10.3390/ijgi11020129

Wiedemann, N., Martin, H., & Westerholt, R. (2023). Benchmarking Regression Models Under Spatial Heterogeneity. Leibniz International Proceedings in Informatics, LIPIcs, 277, 0–15. https://doi.org/10.4230/LIPIcs.GIScience.2023.11

Yang, R., Shen, T., & Yin, W. (2026). Geographically Weighted Regression: A Scoping Review of Methods, Development, and Applications. Land, 15(6), 1–21. https://doi.org/10.3390/land15060915

Ye, M., Zhu, L., Li, X., Ke, Y., Huang, Y., Chen, B., Yu, H., Li, H., & Feng, H. (2023). Estimation of the soil arsenic concentration using a geographically weighted XGBoost model based on hyperspectral data. Science of the Total Environment, 858(April 2022), 159798. https://doi.org/10.1016/j.scitotenv.2022.159798

Zhou, S., Ji, Q., Zhang, L., Wu, J., Li, P., & Zhang, Y. (2025). Exploration of Differences in Housing Price Determinants Based on Street View Imagery and the Geographical-XGBoost Model: Improving Quality of Life for Residents and Through-Travelers. ISPRS International Journal of Geo-Information, 14(10). https://doi.org/10.3390/ijgi14100391




DOI: https://doi.org/10.31764/jtam.v10i4.40121

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Zamrah Mutmainah, Budi Susetyo, Septian Rahardiantoro

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

_______________________________________________

JTAM already indexing:


_______________________________________________

Creative Commons License

JTAM (Jurnal Teori dan Aplikasi Matematika)
is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License

______________________________________________

_______________________________________________

_______________________________________________

JTAM (Jurnal Teori dan Aplikasi Matematika) Editorial Office: