Skip to main content

No project description provided

Project description

gwlearn

Geographically weighted modeling based on scikit-learn.

The aim of the package is to provide implementations of spatially-explicit modelling.

Status

Current development status is early beta. API of the package can change without a warning. Use with caution.

Features

gwlearn provides a framework for prototyping geographically weighted extensions of regression and classification models based on scikit-learn and libpysal.graph and a subset of models implemented on top of this framework. For example, you can run geographically weighted linear regression in a following manner.

import geopandas as gpd
from geodatasets import get_path

from gwlearn.linear_model import GWLinearRegression


gdf = gpd.read_file(get_path('geoda.guerry'))

adaptive = GWLinearRegression(
    geometry=gdf.representative_point(),
    bandwidth=25,
    fixed=False,
    kernel='tricube'
)
adaptive.fit(
    gdf[['Crm_prp', 'Litercy', 'Donatns', 'Lottery']],
    gdf["Suicids"],
)

For details, see the documentation.

Installation

The package is currently not released, so you will need to install it from source.

You can either clone the repository:

git clone https://github.com/pysal/gwlearn.git
cd gwlearn
pip install .

Or install directly from Github:

pip install git+https://github.com/pysal/gwlearn.git

The package depends on:

geopandas>=1.0.0
joblib>=1.4.0
libpysal>=4.12
numpy>=1.26.0
scipy>=1.12.0
scikit-learn>=1.4.0
pandas>=2.1.0

Bug reports

To search for or report bugs, please see the Github issue tracker.

Get in touch

If you have a question regarding gwlearn, feel free to open an issue or join a chat on Discord.

License

The package is licensed under BSD 3-Clause License (Copyright (c) 2025, Martin Fleischmann & PySAL Developers)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gwlearn-0.0.1.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gwlearn-0.0.1-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file gwlearn-0.0.1.tar.gz.

File metadata

  • Download URL: gwlearn-0.0.1.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gwlearn-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5084f3c920f5a1091d5c20e9bdbf8a916cbf6c4887e701e7f068cf36b8947a6d
MD5 8baed97caf2998cdc3f05b943e5a5b19
BLAKE2b-256 b34ec3d536aec10bf84742e00bc91a9c2302eb5d02d2c7d450cb7958f118afa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwlearn-0.0.1.tar.gz:

Publisher: release.yml on pysal/gwlearn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gwlearn-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gwlearn-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gwlearn-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d4e5c2e5a047553231c22cbb504ce1971082dd44bc5ffc55201257f82d36790
MD5 3b425a659bb76f12d439ee91ffc77e75
BLAKE2b-256 1f7bec5b793ca9e1c4290c03bb31cdf26f1766c2dac6c35c4b05527e7310d8ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwlearn-0.0.1-py3-none-any.whl:

Publisher: release.yml on pysal/gwlearn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page