Last active
August 14, 2018 12:47
-
-
Save WillKoehrsen/96e676e81289e8fd2011bb4b51616a5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from hyperopt import hp, tpe, fmin | |
# Single line bayesian optimization of polynomial function | |
best = fmin(fn = lambda x: np.poly1d([1, -2, -28, 28, 12, -26, 100])(x), | |
space = hp.normal('x', 4.9, 0.5), algo=tpe.suggest, | |
max_evals = 2000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment