PCR-SAITS
PCR-SAITS is a lightweight residual-correction layer for multivariate time-series imputation. The development tree now exposes the same audited PCR core over three backbone adapters: SAITS, BRITS, and CSDI.
The published paper remains:
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
Release status
This source tree is the finalized v1.1.0 source candidate produced from a cryptographically bound Phase-3 qualification PASS. Published v1.0.0 artifacts and tags remain immutable. Phase 3.7 final artifact build/install/hash qualification must still pass before publication.
Install from source
python -m pip install .
Core dependencies are numpy, torch, and pypots.
Public API
from pcrsaits import (
SAITSBackbone,
BRITSBackbone,
CSDIBackbone,
PCRSAITS,
PCRBRITS,
PCRCSDI,
)
All three PCR wrappers reuse the same audited PCRCorrector. Adding CSDI does
not change the PCR feature construction, residual network, loss, mask logic, or
window logic.
For a new dataset, explicit feature metadata remains the default:
model = PCRCSDI(
backbone=trained_csdi,
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, and
meteorological. Legacy paper-suite name inference is still available through
metadata_mode="paper_legacy_inference".
CSDI backbone behavior
CSDIBackbone preserves CSDI's probabilistic samples while providing the
deterministic adapter surface required by the unchanged PCR core:
samples = trained_csdi.sample(masked_windows) # [N, S, L, F]
point = trained_csdi.impute(masked_windows) # [N, L, F]
impute() uses the median across diffusion samples by default. The raw sample
ensemble remains available through sample(). Phase 2 does not add the
experimental PCR-CSDI-UQ feature path; Phase 3 preserves that exclusion and CSDI enters only as the third backbone
adapter.
When sampling_seed is an integer, repeated inference is deterministic for a
fixed trained model/input and external CPU/CUDA RNG state is restored. Set
sampling_seed=None for stochastic inference.
Important inference behavior
PCR correction is applied to every cell that is missing in the supplied input. Originally observed cells are restored exactly. CSDI samples and CSDI point imputations also restore observed values exactly at the adapter boundary.
Save / load
Backbone and PCR checkpoints remain separate:
trained_csdi.save("csdi_backbone.pypots")
model.save("pcrcsdi.pt")
Restore the backbone first, then the PCR wrapper:
restored_csdi = CSDIBackbone.load_from_checkpoint(
"csdi_backbone.pypots",
# same constructor configuration used for the backbone
**csdi_config,
)
model = PCRCSDI.load("pcrcsdi.pt", backbone=restored_csdi)
Examples
examples/quickstart_pcrsaits.pyexamples/quickstart_pcrbrits.pyexamples/quickstart_pcrcsdi.py
A real PyPOTS integration verifier is provided at:
scripts/verify_pcrcsdi_real_integration.py
Paper reproduction
Historical experiment programs supplied by the author remain preserved under
paper_reproduction/legacy_scripts/ with their original SHA256 manifest. The
Phase-2 integration does not alter those paper-reproduction sources.
See REPRODUCIBILITY.md for the separation between reusable package code and
historical research scripts.
Citation
CITATION.cff describes software release candidate v1.1.0. The DOI below identifies the existing Zenodo software record; archival metadata is updated only when publication occurs.
Software archive DOI: https://doi.org/10.5281/zenodo.22973879
License
MIT License. See LICENSE.
Metadata
Release files for pcrsaits 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pcrsaits-1.1.0.tar.gz | 30.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pcrsaits-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.3 kB
Release files / pcrsaits-1.1.0.tar.gz
| Download URL | pcrsaits-1.1.0.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e013c276666e9bb1b54cd6e23c60818e4705bad1d7537bd9b4c28d157d0d06cb
|
|
BLAKE2b-256 checksum How to use checksums |
99799f8697cc7a247d86f98947f072ce5ef0c31092ec92102af1d3e09847d31f
|
| 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 27, 2026.
Transparency logRelease files / pcrsaits-1.1.0-py3-none-any.whl
| Download URL | pcrsaits-1.1.0-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45b0454f61c255d458b1d1734d97f176a4fc18e7070036e9e7181da4cf3d9dbb
|
|
BLAKE2b-256 checksum How to use checksums |
79e4a8229fd888111e89d3a1e6c8e4da863d56e0dbf96318ff0e1b9be4438480
|
| 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 27, 2026.
Transparency log