AnotherSamWilson / ParBayesianOptimization

Parallelizable Bayesian Optimization in R
107 stars 18 forks source link

Is it possible to add a by argument to the bounds? #10

Closed flippercy closed 4 years ago

flippercy commented 4 years ago

Currently the bounds must be a list with vectors specifying the lower and upper bounds of each hyperparameter, such as list(X=c(1, 10)). Is it possible to add a third argument as 'by'? For example, list(X=c(1, 10, 2) indicates that the search should be done among c(1, 3, 5, 7, 9).

Thank you!

AnotherSamWilson commented 4 years ago

Not directly, however you can transform the parameter inside your scoring function. Your example would look like:

bounds <- list(
  "x" = c(1L,5L)
)

scoringFunction <- function(x) {
  x <- x*2-1

  # Other Stuff

}
flippercy commented 4 years ago

Thank you Samuel!

Sent from my iPhone

On Apr 15, 2020, at 7:44 AM, Samuel Wilson notifications@github.com<mailto:notifications@github.com> wrote:

Closed #10https://github.com/AnotherSamWilson/ParBayesianOptimization/issues/10.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AnotherSamWilson/ParBayesianOptimization/issues/10#event-3235306156, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMMP5HN5WWCETNXRLDR4Y7TRMWTY5ANCNFSM4MICHTPQ.