Skip to main content

No project description provided

Project description

gwlearn

Continuous Integration codecov PyPI version Conda Version DOI Discord SPEC 0 — Minimum Supported Dependencies

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(
    bandwidth=25,
    fixed=False,
    kernel='bisquare'
)
adaptive.fit(
    gdf[['Crm_prp', 'Litercy', 'Donatns', 'Lottery']],
    gdf["Suicids"],
    geometry=gdf.representative_point(),
)

For details, see the documentation.

Installation

You can install neatnet from PyPI or from conda-forge using the tool of your choice:

pip install gwlearn

Or from conda-forge:

conda install gwlearn -c conda-forge

Installing development version

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.3.tar.gz (2.4 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.3-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gwlearn-0.0.3.tar.gz
  • Upload date:
  • Size: 2.4 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.3.tar.gz
Algorithm Hash digest
SHA256 5b34f64780c7d91501304934af62de0c287c86e65f9bafb8b32592641e9aaece
MD5 1ffd935d43d6b942b91617e50074da85
BLAKE2b-256 2e94ffe4efa1d8ef012d1ae9d88d82ec348eca0cf73bb2c9db13ce04f344ffe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwlearn-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: gwlearn-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 46.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0f2eed06c08c6510610418049d9add1852f4cc37f90bc798c1a4d9b560e70a24
MD5 0f0183bf70d59c412cbe8cd8363fce22
BLAKE2b-256 e6f468d553dc077012eea1db92484f73670234820b8664ecc4542660382548b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwlearn-0.0.3-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