Skip to content

Commit

Permalink
fix offset
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewGhazi committed Jul 1, 2024
1 parent 1231665 commit cc6015a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/run.R
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,13 @@ suggest_next = function(dat, ..., max_grid_size = 2000,

obs_max = max(dat$rating)

offset = .25
minus_max = qM(gp_res |> get_vars("f_star", regex = TRUE)) - obs_max - offset

w = 1*(minus_max > 0)

acq = minus_max * w

max_pred_dens = fsum(acq) |> which.max()
max_pred_dens = fmean(acq) |> which.max()

if (max_pred_dens == 1) cli::cli_warn("Selected the first grid point as maximum of the acquisition function. You may need to run the chains for longer or lower {.var offset}.")

Expand Down

0 comments on commit cc6015a

Please sign in to comment.