Skip to main content

DA-STDK: Data-adaptive spatio-temporal distributional prediction (cluster-adaptive bases, conformal calibration)

Project description

DA-STDK

PyPI Python Tests Code Quality

Reference code for cluster-aware conformal calibration in spatio-temporal distributional prediction.

  • Cluster-adaptive spatial bases — centers and scales initialized from sampling density, so capacity follows heterogeneous observation patterns instead of a fixed grid.
  • Cluster-aware conformal calibration — interval widths are calibrated within spatial clusters, with a global fallback when local samples are scarce.

Benchmarks in this repo use the KAUST spatio-temporal datasets (scenarios 2a/2b).

Architecture

Model backbone

Cluster-adaptive spatial basis, temporal basis, and covariates are concatenated and passed through a shared MLP trunk. Quantile heads predict multiple levels; cluster-aware CQR produces calibrated prediction intervals.

Install

Python 3.10+ and Poetry are enough for most use:

poetry install --with dev

Optional: Conda env via bash envs/conda/build_conda_env.sh then conda activate st-dadk.

pip install da-stdk   # after a PyPI release
# or locally:
pip install -e .
import da_stdk
from da_stdk.models import STDKMLP, create_model
from da_stdk.data.kaust_loader import load_kaust_csv_single

Run

Single training run

poetry run python scripts/train_default.py

KAUST benchmark (multiple scenarios / models)

make kaust
# or (train only, then analyze manually):
poetry run python scripts/run_kaust_data.py --config configs/config_default.yaml
poetry run python scripts/analyze_kaust_results.py --results_dir results/kaust_data_<timestamp>

make kaust runs all scenario×model combos and calls analyze_kaust_results.py when finished (--analyze). Use make kaust-dry to preview commands.

More scripts and flags: scripts/README.md.

Layout

Path Contents
da_stdk/ Models, training, data I/O, conformal utils, viz
scripts/ Training and experiment drivers
configs/ YAML configs
data/ KAUST CSVs (large; not on PyPI)

Dev

make test          # pytest
make lint          # black, isort, mypy
pre-commit run --all-files

Citation

If you use this code, please cite:

Cluster-Aware Conformal Calibration for Spatio-Temporal Distributional Prediction Gooyoung Kim, Chae Young Lim, Wen-Ting Wang, Hao-Yun Huang, Wei-Ying Wu arXiv preprint arXiv:2606.06753, 2026. https://arxiv.org/abs/2606.06753

@misc{kim2026clusterawareconformalcalibrationspatiotemporal,
      title={Cluster-Aware Conformal Calibration for Spatio-Temporal Distributional Prediction},
      author={Gooyoung Kim and Chae Young Lim and Wen-Ting Wang and Hao-Yun Huang and Wei-Ying Wu},
      year={2026},
      eprint={2606.06753},
      archivePrefix={arXiv},
      primaryClass={stat.ME},
      url={https://arxiv.org/abs/2606.06753},
}

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

da_stdk-1.0.2.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

da_stdk-1.0.2-py3-none-any.whl (60.5 kB view details)

Uploaded Python 3

File details

Details for the file da_stdk-1.0.2.tar.gz.

File metadata

  • Download URL: da_stdk-1.0.2.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for da_stdk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3e6e8d4c48ae4ba38f12c72dc4e5363fbed0fab1f6d8295989d60b385ac73020
MD5 12e47ed19cc885463cf9bc9cebc589c1
BLAKE2b-256 c9008d7bbb953e4ff09f69390c3e7d44d4cb58c2e97b7486d2dde945fcc42b28

See more details on using hashes here.

File details

Details for the file da_stdk-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: da_stdk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 60.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for da_stdk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f98bcdb05bb7c316d3abccd54c9d2495d1c820e595a7d16f2c47c439a6c3ad1
MD5 8e0966c190227d5135cb729da3e333fe
BLAKE2b-256 9e2ea6b036111a5b9b4d2a1023c85f4fc2fdc4f67a3efbed014c8832f8764b28

See more details on using hashes here.

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