Skip to main content

Geographically weighted modeling based on scikit-learn.

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.

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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gwlearn-0.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 a125d559f9a38f8285b80dd1c8d89225f9c1bce87874ff25f8312af2e35d0a66
MD5 9104b8de0796df4206525a30a3f8958e
BLAKE2b-256 a851ddb965cea543544bdbdfa80c94b4faa54f3821109002f6e6980dc75a8f33

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gwlearn-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 46.8 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 537018c121281c2a3a366df56d7633add0c57e0582763d7e09e5dd28478e4827
MD5 bf761bb5bcd516a1c3645473a83cdad2
BLAKE2b-256 aa2705a6286ce1887e733fb06112c9d4476e075904903186e7b3e00fb5e7e7b4

See more details on using hashes here.

Provenance

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