https://github.com/ermongroup/csdi
Codes for "CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation"
https://github.com/ermongroup/csdi
Last synced: 6 months ago
JSON representation
Codes for "CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation"
- Host: GitHub
- URL: https://github.com/ermongroup/csdi
- Owner: ermongroup
- License: mit
- Created: 2021-07-07T20:31:21.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T15:01:30.000Z (over 1 year ago)
- Last Synced: 2025-03-29T18:06:01.583Z (6 months ago)
- Language: Jupyter Notebook
- Size: 2.5 MB
- Stars: 353
- Watchers: 8
- Forks: 92
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CSDI
This is the github repository for the NeurIPS 2021 paper "[CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation](https://arxiv.org/abs/2107.03502)".## Requirement
Please install the packages in requirements.txt
## Preparation
### Download the healthcare dataset
```shell
python download.py physio
```
### Download the air quality dataset
```shell
python download.py pm25
```### Download the elecricity dataset
Please put files in [GoogleDrive](https://drive.google.com/drive/folders/1krZQofLdeQrzunuKkLXy8L_kMzQrVFI_?usp=drive_link) to the "data" folder.## Experiments
### training and imputation for the healthcare dataset
```shell
python exe_physio.py --testmissingratio [missing ratio] --nsample [number of samples]
```### imputation for the healthcare dataset with pretrained model
```shell
python exe_physio.py --modelfolder pretrained --testmissingratio [missing ratio] --nsample [number of samples]
```### training and imputation for the healthcare dataset
```shell
python exe_pm25.py --nsample [number of samples]
```### training and forecasting for the electricity dataset
```shell
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](https://github.com/caow13/BRITS) and [DiffWave](https://github.com/lmnt-com/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}
}
```