This repository contains the Python code to reproduce all the figures and experiments presented in the paper:
Masegosa, Andrés. R., Learning under Model Misspecification: Applications to Variational and Ensemble methods. https://arxiv.org/abs/1912.08335
The code is written in Python 3 and uses the following libraries:
This repository has the following directory structure
- README: This file.
- scripts: Folder containing the python scripts to reproduce the results of the empirical evaluation of the paper. More details below.
- results: Foder containing the ouput of the python scripts included in the folder 'scritps'.
- notebooks: Folder containing Jupyter notebooks where all the figures and analysis with artificial data sets can be reprodcued. More details below.
Execute the following python scrpits, which are grouped by algorithm and by task. Running each script you get back results for each data set and for each method used in the paper.
-
PAC^2-Varitional and PAC^2_T-Variational learning algorithms:
-
Supervised classification task: PAC2-Variational-Supervised.py.
> python ./scripts/PAC2-Variational-Supervised.py
-
Self-Supervised classification task with Normal likelihood: PAC2-Variational-SelfSupervisedNormal.py.
> python ./scripts/PAC2-Variational-SelfSupervisedNormal.py
-
Self-Supervised classification task with Binomial likelihood: PAC2-Variational-SelfSupervisedBinomial.py.
> python ./scripts/PAC2-Variational-SelfSupervisedBinomial.py
-
-
PAC^2-Ensemble and PAC^2_T-Ensemble learning algorithms:
-
Supervised classification task: PAC2-Ensemble-Supervised.py.
> python ./scripts/PAC2-Ensemble-Supervised.py
-
Self-Supervised classification task with Normal likelihood: PAC2-Ensemble-SelfSupervisedNormal.py.
> python ./scripts/PAC2-Ensemble-SelfSupervisedNormal.py
-
Self-Supervised classification task with Binomial likelihood: PAC2-Ensemble-SelfSupervisedBinomial.py.
> python ./scripts/PAC2-Ensemble-SelfSupervisedBinomial.py
-
Each of the figures with artificial data illustrating the algorithms can be reproduced using the following notebooks: