PyGRF
PyGRF: An improved Python Geographical Random Forest (GRF) model.
Installation:
PyGRF can be installed from PyPI:
$ pip install PyGRF
Example:
Below shows an example on how to fit a PyGRF model and use it to make predictions.
from PyGRF import PyGRF
from sklearn.model_selection import train_test_split
# Split your data into training and test sets
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)
#Create a PyGRF model by specifying hyperparameters
pygrf_example = PyGRF.PyGRFBuilder(n_estimators=60, max_features=1, band_width=39, train_weighted=True, predict_weighted=True, bootstrap=False,
resampled=True, random_state=42)
#Fit the created PyGRF model based on training data and their spatial coordinates
#xy_coord is the two-dimensional coordinates of training samples
pygrf_example.fit(X_train, y_train, xy_coord)
#Make predictions for testing data using the fitted PyGRF model and you specified local model weight
predict_combined, predict_global, predict_local = pygrf_example.predict(X_test, coords_test, local_weight=0.46)
Parameters:
If you want to learn more about the major parameters in this package, please refer to the Description of Parameters.
Reference:
Kai Sun, Ryan Zhenqi Zhou, Jiyeon Kim, and Yingjie Hu. 2024. PyGRF: An improved Python Geographical Random Forest model and case studies in public health and natural disasters. Transactions in GIS.
Metadata
Release files for PyGRF 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygrf-0.0.12.tar.gz | 9.5 kB | Without provenance | Details for pygrf-0.0.12.tar.gz |
Release files / pygrf-0.0.12.tar.gz
| Download URL | pygrf-0.0.12.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b67bba148adcda45837cfcdc6b654eba15d0f4d220baa885fbabe4b683d89b9e
|
|
BLAKE2b-256 checksum How to use checksums |
3d4ae2e4d22392f07003351151cdd321839f4a8a0a1676dd0a8ae9612b4f970e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.19
|
Security for PyGRF 0.0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.