Skip to content
forked from ermongroup/CSDI

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

License

Notifications You must be signed in to change notification settings

LiJingcoder/CSDI

 
 

Repository files navigation

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}
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.3%
  • Python 3.7%