GPyOpt.core.evaluators package¶
Submodules¶
GPyOpt.core.evaluators.base module¶
-
class
GPyOpt.core.evaluators.base.
EvaluatorBase
(acquisition, batch_size, **kwargs)¶ Bases:
object
Base class for the evaluator of the function. This class handles both sequential and batch evaluators.
-
compute_batch
(duplicate_manager=None, context_manager=None)¶
-
-
class
GPyOpt.core.evaluators.base.
SamplingBasedBatchEvaluator
(acquisition, batch_size, **kwargs)¶ Bases:
GPyOpt.core.evaluators.base.EvaluatorBase
This class handles specific types of batch evaluators, based on the sampling of anchor points (examples are random and Thompson sampling).
-
compute_batch
(duplicate_manager=None, context_manager=None)¶
-
compute_batch_without_duplicate_logic
(context_manager=None)¶
-
get_anchor_points
(duplicate_manager=None, context_manager=None)¶
-
initialize_batch
(duplicate_manager=None, context_manager=None)¶
-
optimize_anchor_point
(a, duplicate_manager=None, context_manager=None)¶
-
zip_and_tuple
(x)¶ convenient helper :param x: input configuration in the model space :return: zipped x as a tuple
-
GPyOpt.core.evaluators.batch_local_penalization module¶
-
class
GPyOpt.core.evaluators.batch_local_penalization.
LocalPenalization
(acquisition, batch_size)¶ Bases:
GPyOpt.core.evaluators.base.EvaluatorBase
Class for the batch method on ‘Batch Bayesian optimization via local penalization’ (Gonzalez et al., 2016).
Parameters: - acquisition – acquisition function to be used to compute the batch.
- size (batch) – the number of elements in the batch.
-
compute_batch
(duplicate_manager=None, context_manager=None)¶ Computes the elements of the batch sequentially by penalizing the acquisition.
-
GPyOpt.core.evaluators.batch_local_penalization.
estimate_L
(model, bounds, storehistory=True)¶ Estimate the Lipschitz constant of f by taking maximizing the norm of the expectation of the gradient of f.
GPyOpt.core.evaluators.batch_random module¶
-
class
GPyOpt.core.evaluators.batch_random.
RandomBatch
(acquisition, batch_size)¶ Bases:
GPyOpt.core.evaluators.base.SamplingBasedBatchEvaluator
Class for a random batch method. The first element of the batch is selected by optimizing the acquisition in a standard way. The remaining elements are selected uniformly random in the domain of the objective.
Parameters: - acquisition – acquisition function to be used to compute the batch.
- size (batch) – the number of elements in the batch.
-
compute_batch_without_duplicate_logic
(context_manager=None)¶
-
get_anchor_points
(duplicate_manager=None, context_manager=None)¶
-
initialize_batch
(duplicate_manager=None, context_manager=None)¶
-
optimize_anchor_point
(a, duplicate_manager=None, context_manager=None)¶
GPyOpt.core.evaluators.batch_thompson module¶
-
class
GPyOpt.core.evaluators.batch_thompson.
ThompsonBatch
(acquisition, batch_size)¶ Bases:
GPyOpt.core.evaluators.base.SamplingBasedBatchEvaluator
Class for a Thompson batch method. Elements are selected iteratively using the current acquistion function but exploring the models by using Thompson sampling
Parameters: - acquisition – acquisition function to be used to compute the batch.
- size (batch) – the number of elements in the batch.
-
compute_batch_without_duplicate_logic
(context_manager=None)¶
-
get_anchor_points
(duplicate_manager=None, context_manager=None)¶
-
initialize_batch
(duplicate_manager=None, context_manager=None)¶
-
optimize_anchor_point
(a, duplicate_manager=None, context_manager=None)¶
GPyOpt.core.evaluators.sequential module¶
-
class
GPyOpt.core.evaluators.sequential.
Sequential
(acquisition, batch_size=1)¶ Bases:
GPyOpt.core.evaluators.base.EvaluatorBase
Class for standard Sequential Bayesian optimization methods.
Parameters: - acquisition – acquisition function to be used to compute the batch.
- size (batch) – it is 1 by default since this class is only used for sequential methods.
-
compute_batch
(duplicate_manager=None, context_manager=None)¶ Selects the new location to evaluate the objective.