# kriging.py

# 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

**kwargsdictOptions dictionary.

- Attributes

alphandarrayReduced likelihood parameter: alpha

LndarrayReduced likelihood parameter: L

n_dimsintNumber of independents in the surrogate

n_samplesintNumber of training points.

sigma2ndarrayReduced likelihood parameter: sigma squared

thetasndarrayKriging hyperparameters.

XndarrayTraining input values, normalized.

X_meanndarrayMean of training input values, normalized.

X_stdndarrayStandard deviation of training input values, normalized.

YndarrayTraining model response values, normalized.

Y_meanndarrayMean of training model response values, normalized.

Y_stdndarrayStandard deviation of training model response values, normalized.

`__init__`

(**kwargs)[source]Initialize all attributes.

- Parameters

**kwargsdictoptions dictionary.

`linearize`

(x)[source]Calculate the jacobian of the Kriging surface at the requested point.

- Parameters

xarray-likePoint 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-likePoint 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-likeTraining input locations.

yarray-likeModel responses at given inputs.

`vectorized_predict`

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

- Parameters

xarray-likeVectorized point(s) at which the surrogate is evaluated.