JointDemandForecasting.py
A framework for multi-step probabilistic time-series/demand forecasting models
File stucture
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.
Environment
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
Running Experiments
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/AAAI22/
folder and run the appropriate scripts:- Toy Density Estimation:
- the best hyperparameter config from our experiments is saved in
experiments/AAAI22/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/AAAI22/results
(no CANF trials were rejected) - plots can be generated with
python plots.py
- with, for example,
- Toy Density Estimation: