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.4.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.4-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gwlearn-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 4db920b6518174ae554e81eb429f3310ec3b5e3f049c40fe3c1bbf61f8f3e966
MD5 03d0a2966e04f5f9ede74206f276957e
BLAKE2b-256 ddeb8be914834f2d962988d394d79ff6adb4032ad76039b260d84b5addd5f607

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gwlearn-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 82c767bb4b7f83d937a83636ccc57baa15e0261a265c6f361b8d20e80d6fe58e
MD5 3012eef668bf032a57116639f106d518
BLAKE2b-256 7e86ea754ba9c9a90f16a9b2878707e167b30ae3f9a5846886375ab7bd6418db

See more details on using hashes here.

Provenance

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