optuna.integration.botorch.qei_candidates_func¶
-
optuna.integration.botorch.qei_candidates_func(train_x: torch.Tensor, train_obj: torch.Tensor, train_con: Optional[torch.Tensor], bounds: torch.Tensor) → torch.Tensor[source]¶ Quasi MC-based batch Expected Improvement (qEI).
The default value of
candidates_funcinBoTorchSamplerwith single-objective optimization.- Parameters
train_x – Previous parameter configurations. A
torch.Tensorof shape(n_trials, n_params).n_trialsis the number of already observed trials andn_paramsis the number of parameters.n_paramsmay be larger than the actual number of parameters if categorical parameters are included in the search space, since these parameters are one-hot encoded. Values are not normalized.train_obj – Previously observed objectives. A
torch.Tensorof shape(n_trials, n_objectives).n_trialsis identical to that oftrain_x.n_objectivesis the number of objectives. Observations are not normalized.train_con – Objective constraints. A
torch.Tensorof shape(n_trials, n_constraints).n_trialsis identical to that oftrain_x.n_constraintsis the number of constraints. A constraint is violated if strictly larger than 0. If no constraints are involved in the optimization, this argument will beNone.bounds – Search space bounds. A
torch.Tensorof shape(n_params, 2).n_paramsis identical to that oftrain_x. The first and the second column correspond to the lower and upper bounds for each parameter respectively.
- Returns
Next set of candidates. Usually the return value of BoTorch’s
optimize_acqf.
Note
Added in v2.4.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v2.4.0.