This project aims at illustring the results of the three use cases in the paper Forecasting time series with constraint (Nathan Doumèche, Francis Bach, Eloi Bedek, Gérard Biau, Claire Boyer, and Yannig Goude).
To install packages used to generate the results in the paper, create a virtual environment using python 3.10.16. Then, run the following command in the terminal.
pip install -r requirements.txtGo to the corresponding directory and unzip the file data_corr.csv.zip.
- WeakL.ipynb generates the forecasts of the WeakL model, which is a direct translation of the GAM-Viking into WeakL framework
- aggregation_WeakL.R computes the performance of the different aggregation of expert. In the last aggregation, we substitute the forecasts of the GAM model with that of the WeakL model generated by WeakL.ipynb.
- WeakL_99.py generates the forecasts of the pure WeakL model. A GPU with a good RAM memory is recommended (e.g. Tesla v100-SXM2-32GB) otherwise the generated tensors will exceed the GPU's capacity.
- bootstrap_significative_test.R computes the significative test of the skill score of the pure WeakL model against the model of the winning team of the competition. More specifically, it computes the lower bound of the unilateral confidence interval with a risk of 10%.
- Create a virtual environment with Python 3.9 and install the packages of requirements.txt.
Go to the corresponding directory and unzip the file dataset_national.csv.zip.
The toy example on hierarchical forecasting was generated with the file hierarchical simulation.ipynb in the Hierarchical forecasting folder.
The files useful for the use case on hierarchical tourism forecasting are in the folder Hierarchical forecasting. The relevant files are
- the data file TourismData_v3.csv,
- the code Tourism.ipynb.