bayesopt <- function(target_func, ..., iter = 10, kernel = c("matern5_2", "matern3_2", "square_exp"), acq_func = c("mutual_information", "confidence_bound"), k = 2) { if(!require(GPfit)) stop('install.packages("GPfit")') # Prepare ----------------------------------------------------------------- target_func <- match.fun(target_func) kernel <- match.arg(kernel) acq_func <- match.arg(acq_func) param