Bayesian Optimization Hyperband Hyperparameter Optimization
Project description
Bayesian Optimization Hyperband Hyperparameter Optimization
Implementation for BOHB
Requirements
- numpy
- scipy
- statsmodels
- torch (example)
Installation
pip3 install bohb-hpo
Usage
from bohb import BOHB
import bohb.configspace as cs
def objective(step, alpha, beta):
return 1 / (alpha * step + 0.1) + beta
def evaluate(params, n_iterations):
loss = 0.0
for i in range(int(n_iterations)):
loss += objective(**params, step=i)
return loss/n_iterations
alpha = cs.CategoricalHyperparameter('alpha', [0.001, 0.01, 0.1])
beta = cs.CategoricalHyperparameter('beta', [1, 2, 3])
configspace = cs.ConfigurationSpace([alpha, beta], seed=123)
opt = BOHB(configspace, evaluate, max_budget=10, min_budget=1)
logs = opt.optimize()
See examples
TODO
- Parallel Optimization (Implemented but not working properly)
- More Hyperparameters
License
bohb-hpo is licensed under the MIT License.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
BOHB_HPO-0.2.1-py3.8.egg
(13.6 kB
view hashes)