gaussian_pi(X, model, y_opt=0.0, xi=0.01, return_grad=False)¶
Use the probability of improvement to calculate the acquisition values.
The conditional probability
P(y=f(x) | x)form a gaussian with a certain mean and standard deviation approximated by the model.
The PI condition is derived by computing
u(f(x)) = 1, if
f(x) < y_optand
u(f(x)) = 0, if``f(x) > y_opt``.
This means that the PI condition does not care about how “better” the predictions are than the previous values, since it gives an equal reward to all of them.
Note that the value returned by this function should be maximized to obtain the
Xwith maximum improvement.
- Xarray-like, shape=(n_samples, n_features)
Values where the acquisition function should be computed.
- modelsklearn estimator that implements predict with
The fit estimator that approximates the function through the method
predict. It should have a
return_stdparameter that returns the standard deviation.
- y_optfloat, default 0
Previous minimum value which we would like to improve upon.
- xifloat, default=0.01
Controls how much improvement one wants over the previous best values. Useful only when
methodis set to “EI”
- return_gradboolean, optional
Whether or not to return the grad. Implemented only for the case where
Xis a single sample.
- values[array-like, shape=(X.shape,)
Acquisition function values computed at X.