The code is used for the experiments in the manuscript, Bayesian Coresets: An Optimization Perspective. We add our IHT methods in addition to Trevor Campbell, etc.'s repository (commit a7d97b7 on Nov 27, 2019).
Please refer to the manuscript for details regarding the two algorithms, i.e., A-IHT I (Algorithm 1) and A-IHT II (Algorithm 2).
The two methods are available at IHT_toolbox/accelerated_iht.py
in the toolbox and can be applied directly. Both numpy version and pytorch version are provided. For large-slcae problems, use the pytorch version on GPU for accelaration.
To install the experiment with pip, download the repository and run pip3 install . --user
in the repository's root folder. Note: this package depends on NumPy, SciPy, and SciKit Learn.
The examples also depend on Bokeh for plotting.
The three experiments in our manuscript are in bayesiancoresets/examples/riemann_gaussian/
(Synthetic Gaussian posterior inference),
bayesiancoresets/examples/riemann_linear_regression/
(Bayesian Radial Basis Function Regression),
and bayesiancoresets/examples/riemann_logistic_poisson_regression/
(Bayesian logistic and Poisson regression),
respectively.
To run the experiments, simply run the run.sh
under each directories.