optuna_integration.botorch.logei_candidates_func

optuna_integration.botorch.logei_candidates_func(train_x, train_obj, train_con, bounds, pending_x)[source]

Log Expected Improvement (LogEI).

The default value of candidates_func in BoTorchSampler with single-objective optimization.

Parameters:
  • train_x (torch.Tensor) – Previous parameter configurations. A torch.Tensor of shape (n_trials, n_params). n_trials is the number of already observed trials and n_params is the number of parameters. n_params may 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 (torch.Tensor) – Previously observed objectives. A torch.Tensor of shape (n_trials, n_objectives). n_trials is identical to that of train_x. n_objectives is the number of objectives. Observations are not normalized.

  • train_con (torch.Tensor | None) – Objective constraints. A torch.Tensor of shape (n_trials, n_constraints). n_trials is identical to that of train_x. n_constraints is the number of constraints. A constraint is violated if strictly larger than 0. If no constraints are involved in the optimization, this argument will be None.

  • bounds (torch.Tensor) – Search space bounds. A torch.Tensor of shape (2, n_params). n_params is identical to that of train_x. The first and the second rows correspond to the lower and upper bounds for each parameter respectively.

  • pending_x (torch.Tensor | None) – Pending parameter configurations. A torch.Tensor of shape (n_pending, n_params). n_pending is the number of the trials which are already suggested all their parameters but have not completed their evaluation, and n_params is identical to that of train_x.

Returns:

Next set of candidates. Usually the return value of BoTorch’s optimize_acqf.

Return type:

torch.Tensor

Note

Added in v3.3.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v3.3.0.