Skip to content

Instantly share code, notes, and snippets.

@statcompute
Last active February 25, 2019 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save statcompute/2b8c1f1c8bd970cc005a4082921b003e to your computer and use it in GitHub Desktop.
Save statcompute/2b8c1f1c8bd970cc005a4082921b003e to your computer and use it in GitHub Desktop.
Bayesian Optimization with Gaussian Prior for Hyper-Parameter
cma_out <- cmaes::cma_es(
par = 0.5,
fn = function(x) grnn.optim(x, net, 4, 2019),
lower = 0.1, upper = 1,
control = list(fnscale = -1, mu = 20, lambda = 50))
#$par
#[1] 0.5766267
#$value
#[1] 0.8018076
bay_out <- rBayesianOptimization::BayesianOptimization(
FUN = function(x) list(Score = grnn.optim(x, net, 4, 2019), Pred = 0),
bounds = list(x = c(0.1, 1)),
init_points = 5, n_iter = 20,
acq = "ucb", verbose = F)
# Best Parameters Found:
#Round = 20 x = 0.5583 Value = 0.8019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment