Skip to content

Commit a241f62

Browse files
committed
Removes fixed algorithm for acquisition function minimization and applies kernel transformation to x_min
1 parent 07f75b2 commit a241f62

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bayes_opt/acquisition.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,7 @@ def continuous_acq(x: NDArray[Float], x_try=x_try) -> NDArray[Float]:
405405
res: OptimizeResult = minimize(
406406
continuous_acq,
407407
x_min[continuous_dimensions],
408-
bounds=continuous_bounds,
409-
method="L-BFGS-B",
410-
)
408+
bounds=continuous_bounds)
411409
if np.squeeze(res.fun) >= min_acq and res.success:
412410
x_try[continuous_dimensions] = res.x
413411
x_min = x_try
@@ -417,6 +415,7 @@ def continuous_acq(x: NDArray[Float], x_try=x_try) -> NDArray[Float]:
417415
min_acq = np.inf
418416
x_min = np.array([np.nan] * space.bounds.shape[0])
419417

418+
x_min=space.kernel_transform(x_min).reshape(x_min.shape)
420419
# Clip output to make sure it lies within the bounds. Due to floating
421420
# point technicalities this is not always the case.
422421
return np.clip(x_min, space.bounds[:, 0], space.bounds[:, 1]), min_acq

0 commit comments

Comments
 (0)