Skip to main content

Spatial machine learning.

Project description

SpML: Spatial Machine Learning

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

Spatial modeling based on scikit-learn.

The aim of the package is to provide implementations of spatially-explicit modelling.

Features

At the moment, spml 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 spml.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 spatial ML from PyPI or from conda-forge using the tool of your choice:

pip install spml

Or from conda-forge:

conda install spml -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 spml, 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

spml-0.2.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.

spml-0.2.2-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

Details for the file spml-0.2.2.tar.gz.

File metadata

  • Download URL: spml-0.2.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.12

File hashes

Hashes for spml-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3412e5bf2bb03fa2ef2a19ea1f71b87a25209a3455cfd291e0c8c7326ee08dde
MD5 1d9598cfd69468727789ab25f9a33bc8
BLAKE2b-256 d77c37260aa9049bac193a86d683bdfa7f1998426cc0fdf50ae8dc1f5357426e

See more details on using hashes here.

Provenance

The following attestation bundles were made for spml-0.2.2.tar.gz:

Publisher: release.yml on pysal/spml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spml-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: spml-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 54.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spml-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eabc76566d590756bc73e6b0a79f83d7ffcf23fbd2c94677b7d18af7105ea92b
MD5 6fe24437bfebe003df4f99521742955f
BLAKE2b-256 7e3063d1d4c4d88d70f57e4a11aaecd08de58815b37bbb7d8fedf7084f96adad

See more details on using hashes here.

Provenance

The following attestation bundles were made for spml-0.2.2-py3-none-any.whl:

Publisher: release.yml on pysal/spml

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