Skip to main content

PCR-SAITS

PCR-SAITS is a lightweight residual-correction layer for multivariate time-series imputation. The public package exposes the same audited PCR core with SAITS and BRITS backbones through a small user-facing API.

Paper:

PCR-SAITS: A Lightweight Disagreement-Based Residual Corrector for SAITS-Based Multivariate Time Series Imputation
Sawet Somnugpong, Expert Systems with Applications (2026)
DOI: https://doi.org/10.1016/j.eswa.2026.134510

Install

From this source tree:

python -m pip install .

Core dependencies are numpy, torch, and pypots.

Public API

from pcrsaits import PCRSAITS, PCRBRITS

Both are thin wrappers around the legacy-equivalence-tested PCRCorrector. A trained SAITS/BRITS backbone is supplied to the PCR wrapper; the PCR layer does not retrain or own the backbone checkpoint.

For a new dataset, explicit feature metadata is the default:

model = PCRSAITS(
    backbone=trained_saits,
    feature_names=["PM2.5", "TEMP", "WSPM"],
    feature_groups=["pollutant", "meteorological", "meteorological"],
)
model.fit(train_values, val_values, seed=7)
imputed = model.impute(masked_values)

Allowed public feature groups are:

  • pollutant
  • sensor
  • meteorological

To reproduce legacy paper-suite name inference, use:

model = PCRSAITS(
    backbone=trained_saits,
    feature_names=["CO(GT)", "PT08.S1(CO)", "T"],
    metadata_mode="paper_legacy_inference",
)

Important inference behavior

PCR correction is applied to every cell that is missing in the supplied input. Originally observed cells are restored exactly.

Save / load

Backbone and PCR checkpoints are intentionally separate:

trained_saits.save("saits_backbone.pypots")
model.save("pcrsaits.pt")

After restoring the backbone:

model = PCRSAITS.load("pcrsaits.pt", backbone=restored_saits)

Examples

  • examples/quickstart_pcrsaits.py
  • examples/quickstart_pcrbrits.py

Paper reproduction

Historical experiment programs supplied by the author are preserved under paper_reproduction/legacy_scripts/ with a SHA256 manifest.

python paper_reproduction/verify_sources.py

Final reviewer-specific Table 17 and patient-aware PhysioNet source identities are recorded separately so that older protocols are not silently presented as the final paper protocol.

See:

  • REPRODUCIBILITY.md
  • paper_reproduction/README.md
  • paper_reproduction/PHYSIONET_PROTOCOL.md

Citation

See CITATION.cff.

Software archive DOI: https://doi.org/10.5281/zenodo.22973879

Release status

This tree is the v1.0.0 release payload prepared for final pre-tag audit. The Git tag and archival deposit should be created only after the clean ZIP, wheel, and sdist hashes are independently verified.

License

MIT License. See LICENSE.

Metadata

Release files for pcrsaits 1.0.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 pcrsaits 1.0.0
File Size Uploaded
pcrsaits-1.0.0.tar.gz 23.8 kB Details

Built distribution (wheel)

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

Total release size: 42.9 kB

Release files / pcrsaits-1.0.0.tar.gz

Download URL pcrsaits-1.0.0.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1aeac34cd7173cfd6845d1e93ca91add6b7575c1fec0fd8080eb1889990d60ee
BLAKE2b-256 checksum
How to use checksums
85d780c6892a3257a4ab3624ae121b00f716cb7aea9c8736e89b268f9c383753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

Release files / pcrsaits-1.0.0-py3-none-any.whl

Download URL pcrsaits-1.0.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c63ebc3226df8d0ffe238b026bc5450ee6242d33a81f33f456627e0a41902a73
BLAKE2b-256 checksum
How to use checksums
6f569d9f85d92bef70f8aa794b27c24c978a7ebe0465e75970a709afe66e26fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.0

2 release files

This release

1.0.0 This release

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