https://github.com/samcomber/spacv

Spatial cross-validation in Python.

https://github.com/samcomber/spacv

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary

Keywords

cross-validation data-science geographic-data-science machine-learning python scikit-learn scikitlearn-machine-learning sklearn spatial-data-science
Last synced: 6 months ago · JSON representation

Repository

Spatial cross-validation in Python.

Basic Info
  • Host: GitHub
  • Owner: SamComber
  • License: bsd-3-clause
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 3.76 MB
Statistics
  • Stars: 47
  • Watchers: 3
  • Forks: 14
  • Open Issues: 4
  • Releases: 0
Topics
cross-validation data-science geographic-data-science machine-learning python scikit-learn scikitlearn-machine-learning sklearn spatial-data-science
Created over 5 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

spacv: spatial cross-validation in Python

spacv is a small Python 3 (3.6 and above) package for cross-validation of models that assess generalization performance to datasets with spatial dependence. spacv provides a familiar sklearn-like API to expose a suite of tools useful for points-based spatial prediction tasks. See the notebook spacv_guide.ipynb for usage.

Dependencies

  • numpy
  • matplotlib
  • pandas
  • geopandas
  • shapely
  • scikit-learn
  • scipy

Installation and usage

To install use pip:

$ pip install spacv

Then build quick spatial cross-validation workflows with sklearn as:

```python import spacv import geopandas as gpd from sklearn.modelselection import crossval_score from sklearn.svm import SVC

df = gpd.read_file('data/baltim.geojson')

XYs = df['geometry'] X = df[['NROOM', 'BMENT', 'NBATH', 'PRICE', 'LOTSZ', 'SQFT']] y = df['PATIO']

Build fold indices as a generator

skcv = spacv.SKCV(nsplits=4, bufferradius=10).split(XYs)

svc = SVC()

crossvalscore(svc, # Model X, # Features y, # Labels cv = skcv) # Fold indices ```

Owner

  • Name: Sam Comber
  • Login: SamComber
  • Kind: user
  • Location: Liverpool, UK
  • Company: Geographic Data Science Lab

Data Scientist

GitHub Events

Total
  • Watch event: 5
Last Year
  • Watch event: 5

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 62
  • Total Committers: 2
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.016
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
SamComber s****r@h****k 61
samcomber s****r@h****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 3
  • Total pull requests: 3
  • Average time to close issues: about 8 hours
  • Average time to close pull requests: less than a minute
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ljwolf (1)
  • p91g (1)
  • jay-reynolds (1)
Pull Request Authors
  • dluks (2)
  • sarah-paradis (2)
  • SamComber (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 31 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
pypi.org: spacv

Spatial cross-validation in Python

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 31 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 10.5%
Stargazers count: 10.8%
Average: 19.1%
Dependent repos count: 21.6%
Downloads: 42.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • geopandas *
  • matplotlib *
  • numpy *
  • pandas *
  • pygeos *
  • scikit-learn *
  • scipy *
  • shapely *
setup.py pypi
  • t.strip *