← Open Source

Codes for "CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation".

Jupyter Notebook
Momentum
+0stars in 24 hours0.0%
470
Stars
115
Forks
1
Contributors
Created 2021-07-07 · Updated 2026-12-05 · #24497 today
Top developers
y-tashi
README

CSDI

This is the github repository for the NeurIPS 2021 paper "CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation".

Requirement

Please install the packages in requirements.txt

Preparation

Download the healthcare dataset

python download.py physio

Download the air quality dataset

python download.py pm25

Download the elecricity dataset

Please put files in GoogleDrive to the "data" folder.

Experiments

training and imputation for the healthcare dataset

python exe_physio.py --testmissingratio [missing ratio] --nsample [number of samples]

imputation for the healthcare dataset with pretrained model

python exe_physio.py --modelfolder pretrained --testmissingratio [missing ratio] --nsample [number of samples]

training and imputation for the healthcare dataset

python exe_pm25.py --nsample [number of samples]

training and forecasting for the electricity dataset

python exe_forecasting.py --datatype electricity --nsample [number of samples]

Visualize results

'visualize_examples.ipynb' is a notebook for visualizing results.

Acknowledgements

A part of the codes is based on BRITS and DiffWave

Citation

If you use this code for your research, please cite our paper:

@inproceedings{tashiro2021csdi,
  title={CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation},
  author={Tashiro, Yusuke and Song, Jiaming and Song, Yang and Ermon, Stefano},
  booktitle={Advances in Neural Information Processing Systems},
  year={2021}
}
Nearby in the ranking

AI Rank for iPhone

Follow AI model rankings

Download on the App Store