A framework for multi-step probabilistic time-series/demand forecasting models. Code for "Conditional Approximate Normalizing Flows for Joint Multi-Step Probabilistic Forecasting with Application to Electricity Demand". If you find this repository useful, please cite the following:
@article{jamgochian2022conditional,
author = {Arec Jamgochian and Di Wu and Kunal Menda and Soyeon Jung and Mykel J. Kochenderfer},
title = {Conditional Approximate Normalizing Flows for Joint Multi-Step Probabilistic Forecasting with Application to Electricity Demand},
journal = {arXiv:2201.02753 [cs]},
year = {2022}
}
JointDemandForecasting
contains the source code for the packagedatasets
contains datasets pertaining to experiments.datasets/raw
contains raw datasetsdatasets/processed
contains processed datasetsdatasets/process_utils
contains utilities for processing utilitiesdatasets/README.md
contains instructions for sourcing at processing all datasets.
experiments
contains any experiments conducted in the submitted manuscript.
A conda environment for exact experiment reproduction can be set up and uses with:
conda create -y --name jdf python==3.7
conda install -y --name jdf --file requirements.txt
conda activate jdf
...
conda deactivate
To enable CUDA capabilities, rerun:
conda install --name jdf pytorch cudatoolkit=10.2 -c pytorch
To run experiments from the associated paper:
- Install and activate the environment.
- Follow directions in the
datasets
folder to download and process the OPENEI dataset. - Navigate the the
experiments/arxiv/
folder and run the appropriate scripts:- Toy Density Estimation:
- the best hyperparameter config from our experiments is saved in
experiments/arxiv/results/simple_square_best_hyperparams.json
- to run the experiment from the paper with this config, run
python simple_experiment.py --test
- to retune hyperparameters based on a grid search with a grid defined in-file, run
python simple_experiment.py --tune
- the best hyperparameter config from our experiments is saved in
- Electricity Demand Application
- with, for example,
python ConditionalModels.py
- ARMA, IFNN, IRNN models are in
IterativeModels.py
, CG and CGMM are inConditionalModels.py
, MOGP is inMultiOutputGP.py
, JFNN is inJFNN.py
, JRNN is inJRNN.py
, and CANF is inCANF.py
- pick appropriate setting (location, input length, output length, etc.) by uncommenting appropriate line
- ARMA, IFNN, IRNN models are in
- our multi-trial results, as well as run-rejection for outlier trials can be seen in
experiments/arxiv/results
(no CANF trials were rejected) - plots can be generated with
python plots.py
- with, for example,
- Toy Density Estimation: