kriging.py

Surrogate model based on Kriging.

class openmdao.surrogate_models.kriging.KrigingSurrogate(**kwargs)[source]

Bases: openmdao.surrogate_models.surrogate_model.SurrogateModel

Surrogate Modeling method based on the simple Kriging interpolation.

Predictions are returned as a tuple of mean and RMSE. Based on Gaussian Processes for Machine Learning (GPML) by Rasmussen and Williams. (see also: scikit-learn).

Parameters
**kwargsdict

Options dictionary.

Attributes
alphandarray

Reduced likelihood parameter: alpha

Lndarray

Reduced likelihood parameter: L

n_dimsint

Number of independents in the surrogate

n_samplesint

Number of training points.

sigma2ndarray

Reduced likelihood parameter: sigma squared

thetasndarray

Kriging hyperparameters.

Xndarray

Training input values, normalized.

X_meanndarray

Mean of training input values, normalized.

X_stdndarray

Standard deviation of training input values, normalized.

Yndarray

Training model response values, normalized.

Y_meanndarray

Mean of training model response values, normalized.

Y_stdndarray

Standard deviation of training model response values, normalized.

__init__(**kwargs)[source]

Initialize all attributes.

Parameters
**kwargsdict

options dictionary.

linearize(x)[source]

Calculate the jacobian of the Kriging surface at the requested point.

Parameters
xarray-like

Point at which the surrogate Jacobian is evaluated.

Returns
ndarray

Jacobian of surrogate output wrt inputs.

predict(x)[source]

Calculate predicted value of the response based on the current trained model.

Parameters
xarray-like

Point at which the surrogate is evaluated.

Returns
ndarray

Kriging prediction.

ndarray, optional (if eval_rmse is True)

Root mean square of the prediction error.

train(x, y)[source]

Train the surrogate model with the given set of inputs and outputs.

Parameters
xarray-like

Training input locations.

yarray-like

Model responses at given inputs.

vectorized_predict(x)

Calculate predicted values of the response based on the current trained model.

Parameters
xarray-like

Vectorized point(s) at which the surrogate is evaluated.