Skip to main content

No project description provided

Project description

gwlearn

Continuous Integration codecov PyPI version

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='tricube'
)
adaptive.fit(
    gdf[['Crm_prp', 'Litercy', 'Donatns', 'Lottery']],
    gdf["Suicids"],
    geometry=gdf.representative_point(),
)

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.2.tar.gz (2.2 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.2-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gwlearn-0.0.2.tar.gz
  • Upload date:
  • Size: 2.2 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.2.tar.gz
Algorithm Hash digest
SHA256 a21b3377c5b8e597c05746efab232c2a35f48d269f2bd9e78368cfad6b92a3ef
MD5 9ea27e1a1235ed2d51a56162ba7b0eda
BLAKE2b-256 e1fd627998c07abe53be653ec2b62bd45ed6d666a3605ac0eba0356a4e3983ae

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gwlearn-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 46.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1aa36a180fca69440bdae173302e08573a9b65048dcba493836f213050c7081
MD5 d549c1640345de59fafcafedd9b12975
BLAKE2b-256 8007b4b3138aacb1645d9fd4e8fb7285d9eff9cca822b454e663983749a834f6

See more details on using hashes here.

Provenance

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