-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Problem
It seems that currently, I can't provide an initGrid consisting of a data frame with only 1 row.
The inBounds <- as.logical(apply(inBounds,1,prod)) in https://github.com/AnotherSamWilson/ParBayesianOptimization/blob/master/R/bayesOpt.R will fail if there is just 1 row.
Error
Error in apply(inBounds, 1, prod) : dim(X) must have a positive lengthReproducible Example
library(ParBayesianOptimization)
simpleFunction <- function(x) dnorm(x,3,2)*1.5 + dnorm(x,7,1) + dnorm(x,10,2)
FUN <- function(x) list(Score = simpleFunction(x))
bounds <- list(x=c(0,15))
initGrid <- data.frame(x=c(5))
set.seed(6)
optObjSimp <- bayesOpt(
FUN = FUN
, bounds = bounds
, initGrid = initGrid
, iters.n = 2
)
Metadata
Metadata
Assignees
Labels
No labels