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)
best = opt.optimize()
See examples
TODO
- Conditional Parameters
- Parallel Optimization (Implemented but not working properly)
- Better Logging
- 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 Distribution
BOHB_HPO-0.0.10.tar.gz
(4.5 kB
view hashes)
Built Distribution
BOHB_HPO-0.0.10-py3.8.egg
(11.3 kB
view hashes)