# PyGRF: An improved Python Geographical Random Forest model and case studies in public health and natural disasters

arXiv: https://arxiv.org/abs/2409.13947 · HTML: https://mlsanity.com/paper/2409.13947/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 1 of its 33 references that are in the map.
- First posted on arXiv 20 Sep 2024.

## Builds on (most cited first, 1 of 1)

- [The role of alcohol outlet visits derived from mobile phone location data in enhancing domestic violence prediction at the neighborhood level](https://mlsanity.com/paper/2203.04088/) (2022)

## Built on by (most cited first, 3 of 3)

- [Investigating Robotaxi Crash Severity with Geographical Random Forest and the Urban Environment](https://mlsanity.com/paper/2505.06762/) (2025)
- [PyGALAX: An Open-Source Python Toolkit for Advanced Explainable Geospatial Machine Learning](https://mlsanity.com/paper/2602.00907/) (2026)
- [Spatially explicit feature importance for building height estimation using research-access high-resolution SAR and optical sensors](https://mlsanity.com/paper/2608.17822/) (2026)

## Abstract (arXiv)

Geographical random forest (GRF) is a recently developed and spatially explicit machine learning model. With the ability to provide more accurate predictions and local interpretations, GRF has already been used in many studies. The current GRF model, however, has limitations in its determination of the local model weight and bandwidth hyperparameters, potentially insufficient numbers of local training samples, and sometimes high local prediction errors. Also, implemented as an R package, GRF currently does not have a Python version which limits its adoption among machine learning practitioners who prefer Python. This work addresses these limitations by introducing theory-informed hyperparameter determination, local training sample expansion, and spatially-weighted local prediction. We also develop a Python-based GRF model and package, PyGRF, to facilitate the use of the model. We evaluate the performance of PyGRF on an example dataset and further demonstrate its use in two case studies in public health and natural disasters.
