rBayesianOptimization
rBayesianOptimization copied to clipboard
Error: Non-finite value supplied by optim
The rBayesianOptimization sometimes generates an error Non-finite value supplied by optim during the iteration.
The numbers of round in which I get this error are different every time.
Below is my code.
func <- function(x, y){
return(list(Score = - x ^ 2 + cos(10 * x) - y ^ 2 + cos(10 * y), Pred = 0))
}
library(rBayesianOptimization)
opt <- BayesianOptimization(
func
, bounds = list(x = c(-1.0, 1.0),
y = c(-1.0, 1.0))
, init_points = 5
, n_iter = 100
, kappa = 2.576
, eps = 0.0
, acq = "ei"
, verbose = TRUE
)
Is there a way to avoid this error and make rBayesianOptimization finish the iteration?
I am also having this problem and thus, I am wondering if this issue was resolved. I have assured that the input matrix is full rank, as I thought this may be the cause of the problem.
I love the package and would really appreciate support on this issue.
Same situation as with jasonhearn. Can not figure out the reason.
I am hitting the same issue. Would love some help on this!
I did some digging around in the code. For me, the error was thrown when I run the optim_result <- optim(...) function in Utility_Max. I suspect it might be hitting an unstable minimum for me. Do you have suggestions on how to resolve this?
I'm considering changing the control = list(maxit = 100, factr = 5e11) parameter. However, what would be a reasonable range for this for GP optimization?
Thanks!!
Got the same issue today. I'd really appreciate if it were fixed.
I'm also getting this issue.
I had the same error.
What worked for me was to change the acquisition function from Expected improvement to GP lower confidence bound.
changing acquisition function to acq = "ucb" solved this for me too.