Skip to main content

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.

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.

Status

Current development status is beta. The core API of the package should not change without a warning and a proper deprecation cycle. However, minor breaking changes may still occur.

Installation

You can install gwlearn 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

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)

Funding

Charles University logo

Charles University’s Primus programme through the project "Influence of Socioeconomic and Cultural Factors on Urban Structure in Central Europe", project reference PRIMUS/24/SCI/023.

Release files for gwlearn 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gwlearn 0.2.0
File Size Uploaded
gwlearn-0.2.0.tar.gz 2.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gwlearn 0.2.0
File Interpreter ABI Platform
gwlearn-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / gwlearn-0.2.0.tar.gz

Download URL gwlearn-0.2.0.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
29d24341f71e9851dba0cf99fd91395f788ffb8203b12d56db7c0f9d307df779
BLAKE2b-256 checksum
How to use checksums
12ffc9ebd88c2973853012eaeb70d5e09870e5d6e59e38a72d61529f49ac9849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 7, 2026.

Transparency log

Release files / gwlearn-0.2.0-py3-none-any.whl

Download URL gwlearn-0.2.0-py3-none-any.whl
Size 53.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb5dca57085d10b76b0e8f9c1f08cb537034956cf8d1cf81d02c88344f5303a6
BLAKE2b-256 checksum
How to use checksums
798ea3e4b2c11c1d9bec718f1a75176940d11230c467b5eff2f69ea2426f21c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page