Open petbadger opened 6 years ago
When I was using my own dataset, I actually will get the same error. It appears to have to do with the parameter ranges. If one of these are wacky, it produces a Value of NaN which I think contributes to the GP deviance error.
My init_points is greater 0 and my bounds work for most series (I loop over them). Is there another way to overcome this please? I tried using tryCatch in my loss/aqu. function. Thanks.
Just an FYI in case anyone gets a GP_deviance error. Thought I should share this, in the obscure chance it will help someone else. Took me a good 2 hours of horsing around before I found the issue.
I was playing with this example: http://rpubs.com/tdneumann/351073 which produces the error:
Error in GP_deviance(param_init_200d[i, ], X, Y, nug_thres, corr = corr) : Infinite values of the Deviance Function, unable to find optimum parameters
rBayesianOptimization imports GPfit, which has the GP_deviance function.
My silly and futile first attempt was to replicate the Rpubs example as best I could: Use Rstudio, subset the dataset to Dec 22, 2017 when the post was created, run rBayesianOptimization version 1.1.0 and GPfit version 1.0-0. Though neither of these packages appear to have been updated since the Rpubs post.
I ran my own time series data through it, and I got the same error.
Then I stumbled on what seemed to cause the issue. The Rpubs article sets init_points = 0 in the call to BayesianOptimization. Setting this to an integer greater than 0 makes the code work.