bayes_opt.acquisition.GPHedge
¶
-
class bayes_opt.acquisition.GPHedge(base_acquisitions: Sequence[AcquisitionFunction], random_state: int | RandomState | None =
None
) None ¶ GPHedge acquisition function.
At each suggestion step, GPHedge samples suggestions from each base acquisition function acq_i. Then a candidate is selected from the suggestions based on the on the cumulative rewards of each acq_i. After evaluating the candidate, the gains are updated (in the next iteration) based on the updated expectation value of the candidates.
- For more information, see:
Brochu et al., “Portfolio Allocation for Bayesian Optimization”, https://arxiv.org/abs/1009.5419
- Parameters:¶
- base_acquisitions : Sequence[AcquisitionFunction]¶
Sequence of base acquisition functions.
- random_state : int, RandomState, default None¶
Set the random state for reproducibility.
- base_acq(*args: Any, **kwargs: Any) NoReturn ¶
Raise an error, since the base acquisition function is ambiguous.
-
suggest(gp: GaussianProcessRegressor, target_space: TargetSpace, n_random: int =
10000
, n_l_bfgs_b: int =10
, fit_gp: bool =True
) ndarray[Any, dtype[floating[Any]]] ¶ Suggest a promising point to probe next.
- Parameters:¶
- gp : GaussianProcessRegressor¶
A fitted Gaussian Process.
- target_space : TargetSpace¶
The target space to probe.
- n_random : int, default 10_000¶
Number of random samples to use.
- n_l_bfgs_b : int, default 10¶
Number of starting points for the L-BFGS-B optimizer.
- fit_gp : bool, default True¶
Whether to fit the Gaussian Process to the target space. Set to False if the GP is already fitted.
- Return type:¶
- Returns:¶
np.ndarray – Suggested point to probe next.