Offline Contextual Bayesian Optimization
Project description
Offline Contextual Bayesian Optimization
Overview
In Bayesian Optimization (BO), many times there are several systems or "tasks" to simultaneously optimize. This repository contains Multi-task Thompson Sampling (MTS), a BO algorithm we developed to pick both tasks and actions to evaluate. Because some tasks are usually more difficult than others, MTS often significantly outperforms standard BO techniques.
Getting Set Up
The code is compatible with python 2.7. First, clone this repo and run
pip install -r requirements
By default the code leverages the Dragonfly library.
Reproducing Synthetic Experiments
The plots in the paper can be reproduced by running ocbo.py and cts_ocbo.py with the appropriate options file.
cd src
mkdir data
python ocbo.py --options <path_to_option_file>
or if continuous
python cts_ocbo.py --options <path_to_option_file>
After the simulation has finished, the plots can be reproduced by
cd scripts
python discrete_plotter.py --write_dir ../data --run_id <options_name>
or
python cts_plotter.py --write_dir ../data --run_id <options_name>
For discrete experiments, use the flag --risk_neutral 1
to show the risk
neutral performance instead and use --plot_props 1
flag to show the
proportion of resources given to different tasks.
With the exception of the experiment in Section 4, the table below shows the option file the corresponds to a given experiment.
Experiment | Option File |
---|---|
Figure 1(a,b) | set2d.txt |
Figure 1(c) | rand4d.txt |
Figure 1(d) | rand6d.txt |
Figure 1(e)/4(a) | jointbran.txt |
Figure 1(f)/4(b) | jointh22.txt |
Figure 1(g)/4(c) | jointh31.txt |
Figure 1(h)/4(d) | jointh42.txt |
Figure 5(a) | contbran.txt |
Figure 5(b) | conth22.txt |
Figure 5(c) | conth31.txt |
Figure 5(d) | conth42.txt |
Figure 5(e) | contbran_sethps.txt |
Figure 5(f) | conth22_sethps.txt |
Figure 5(g) | conth31_sethps.txt |
Figure 5(h) | conth42_sethps.txt |
Citing Work
If you use any code please cite the following:
@inproceedings{char2019offline,
title={Offline contextual bayesian optimization},
author={Char, Ian and Chung, Youngseog and Neiswanger, Willie and Kandasamy, Kirthevasan and Nelson, Andrew Oakleigh and Boyer, Mark and Kolemen, Egemen and Schneider, Jeff},
booktitle={Advances in Neural Information Processing Systems},
pages={4627--4638},
year={2019}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file OCBO-0.1.2.tar.gz
.
File metadata
- Download URL: OCBO-0.1.2.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 264c5c361c05a52262149bf6db41ec0370d08c2be97d0bc05e8f39da830dd75c |
|
MD5 | d6c2c8d7d84386dfb8b9c29b10599e00 |
|
BLAKE2b-256 | 928b8a545ef31a77d91afdc4cd872294aacd277c0b26cdfed3acd85ee5403996 |