Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryujaehun/batchbo
https://github.com/ryujaehun/batchbo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryujaehun/batchbo
- Owner: ryujaehun
- Created: 2020-10-31T17:01:23.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-31T17:03:14.000Z (about 4 years ago)
- Last Synced: 2023-07-31T15:11:40.989Z (over 1 year ago)
- Language: Jupyter Notebook
- Size: 22.9 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Batch Bayesian Optimization
# Usage
from bayes_opt import BayesianOptimization
```
def black_box_function(x, y):
return -(-x ** 2 - (y - 1) ** 2 + 1)optimizer = BayesianOptimization(
f=None,
pbounds={'x': (-2, 4), 'y': (-3, 3)},
verbose=2,
random_state=1,
n_restarts_optimizer=5,
batch_size=4
)
from bayes_opt import UtilityFunctionutility = UtilityFunction(kind="ucb", kappa=2.5, xi=0.0)
for _ in range(10):
next_point = optimizer.suggest(utility)target = black_box_function(**next_point)
optimizer.register(params=next_point, target=target)
print(target)print(target, next_point)
```