Skip to content

Instantly share code, notes, and snippets.

@mehdidc
Created July 19, 2016 15:48
Show Gist options
  • Save mehdidc/db5572dd0398a548b785777763cfd42f to your computer and use it in GitHub Desktop.
Save mehdidc/db5572dd0398a548b785777763cfd42f to your computer and use it in GitHub Desktop.
from skopt import gp_minimize, forest_minimize, dummy_minimize, gbrt_minimize
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import Matern
from skopt.benchmarks import branin
x0 = [[1, 2], [3, 4], [5, 6]]
y0 = map(branin, x0)
res = gp_minimize(branin,
[(-5.0, 10.0), (0.0, 15.0)],
maxiter=100,
x0=x0,
y0=y0,
random_state=1)
print(res.x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment