Skip to content

Code for the experiments in the paper "Decision-Focused Forecasting: Decision Losses for Multistage Optimisation".

Notifications You must be signed in to change notification settings

EgoPer/Decision-Focused-Forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Decision Focused Forecasting

This repository contains the code to replicate the experiment in the eponymous paper.

The data for the battery storage experiment (contained in battery_storage/Data/battery_storage) was copied from the respository associated with Donti et al. (2017). The original time series used to be published by PJM. We also borrow some of the data loading code in data_utils.py. The data for the portfolio optimisation experiment (contained in portfolio_optimisation/Data/portfolio_optimisation/CNNpred) was copied from repository.

battery storage predictions
Figure 1: Example model predictions on the battery storage task.

Running

The models are built with PyTorch and cvxpylayers, implementation is in models.py. We provide a requirements.py file to clarify other dependencies. To try the experiment with diffferent hyperparameters the hyperparameters.py file contains a function in which settings may be changed. To run the experiment first cd into the desired experiment and call run.py in which one can define how many replications to run. The file runs the experiment function defined in experiment_whole_policy_evaluation.py which contains the whole pipeline as assembled from other files.

Other files

  • Results/policy/ contains the results of the experiments that we ran (not including saved models due to size in the case of portfolito optimisation).
  • data_utils.py contains loading/processing functions for data and dataset classes for training and evaluation.
  • evaluation_utils.py contains evaluation functions.
  • optimisation_utils.py contains functions which parametrically build the cvxpy problem and optimisation layer, and the torch loss function for the DFF optimisation.

About

Code for the experiments in the paper "Decision-Focused Forecasting: Decision Losses for Multistage Optimisation".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published