skopt.acquisition
.gaussian_ei¶
-
skopt.acquisition.
gaussian_ei
(X, model, y_opt=0.0, xi=0.01, return_grad=False)[source][source]¶ Use the expected 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 EI condition is derived by computing
E[u(f(x))]
whereu(f(x)) = 0
, iff(x) > y_opt
andu(f(x)) = y_opt - f(x)
, if``f(x) < y_opt``.This solves one of the issues of the PI condition by giving a reward proportional to the amount of improvement got.
Note that the value returned by this function should be maximized to obtain the
X
with maximum improvement.- Parameters
- Xarray-like, shape=(n_samples, n_features)
Values where the acquisition function should be computed.
- modelsklearn estimator that implements predict with
return_std
The fit estimator that approximates the function through the method
predict
. It should have areturn_std
parameter 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
method
is set to “EI”- return_gradboolean, optional
Whether or not to return the grad. Implemented only for the case where
X
is a single sample.
- Returns
- valuesarray-like, shape=(X.shape[0],)
Acquisition function values computed at X.