贝叶斯优化 Hyperband 超参数优化
实施
要求
- numpy
- scipy
- statsmodels
- dask
- torch (example)
安装
pip3 install bohb-hpo
用法
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 )
1