`BayesianOptimizationOracle`

class```
keras_tuner.oracles.BayesianOptimizationOracle(
objective,
max_trials,
num_initial_points=None,
alpha=0.0001,
beta=2.6,
seed=None,
hyperparameters=None,
allow_new_entries=True,
tune_new_entries=True,
)
```

Bayesian optimization oracle.

It uses Bayesian optimization with a underlying Gaussian process model. The acquisition function used is upper confidence bound (UCB), which can be found here.

**Arguments**

**objective**: A string or`keras_tuner.Objective`

instance. If a string, the direction of the optimization (min or max) will be inferred.**max_trials**: Integer, the total number of trials (model configurations) to test at most. Note that the oracle may interrupt the search before`max_trial`

models have been tested if the search space has been exhausted.**num_initial_points**: Optional number of randomly generated samples as initial training data for Bayesian optimization. If left unspecified, a value of 3 times the dimensionality of the hyperparameter space is used.**alpha**: Float, the value added to the diagonal of the kernel matrix during fitting. It represents the expected amount of noise in the observed performances in Bayesian optimization. Defaults to 1e-4.**beta**: Float, the balancing factor of exploration and exploitation. The larger it is, the more explorative it is. Defaults to 2.6.**seed**: Optional integer, the random seed.**hyperparameters**: Optional`HyperParameters`

instance. Can be used to override (or register in advance) hyperparameters in the search space.**tune_new_entries**: Boolean, whether hyperparameter entries that are requested by the hypermodel but that were not specified in`hyperparameters`

should be added to the search space, or not. If not, then the default value for these parameters will be used. Defaults to True.**allow_new_entries**: Boolean, whether the hypermodel is allowed to request hyperparameter entries not listed in`hyperparameters`

. Defaults to True.