Open alex7tula opened 6 years ago
Other way - not fill Pred by real data in FUN.
return(list(Score = Score, Pred = 0))
What sense to use Pred? you use BayesianOptimization only as tube to transfer to external function? If it is required i can to save Pred to a global variable.
Hi, i try to run
All above is Ok. Then
OPT_Res <- BayesianOptimization(FUN, bounds = bonds,init_grid_dt = grid_dt, init_points = 3, n_iter = 3, acq = "ucb", kappa = 2.576, eps = 0.0, verbose = TRUE);
Here i get error in line 203
Pred_DT <- data.table::as.data.table(Pred_list)
: data.table(NULL, NULL, NULL, NULL, NULL, NULL: column or argument 1 is NULLI check Pred_list. First 6 items filled by NULL, next filled by matrix with calculated prdictions. In line 127 you create it and left as NULL
Pred_list <- vector(mode = "list", length = nrow(DT_history))
I replase line 133
next
toPred_list[[i]] <- 0; next;
Now all runs without errors. Please correct your version.