kriging.py

Surrogate model based on Kriging.

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

Bases: openmdao.surrogate_models.kriging.KrigingSurrogate

Deprecated.

__init__(self, **kwargs)[source]

Capture Initialize to throw warning.

Parameters
**kwargsdict

Deprecated arguments.

linearize(self, x)

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(self, x)

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(self, x, y)

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(self, 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.

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).

Attributes

alpha

(ndarray) Reduced likelihood parameter: alpha

L

(ndarray) Reduced likelihood parameter: L

n_dims

(int) Number of independents in the surrogate

n_samples

(int) Number of training points.

sigma2

(ndarray) Reduced likelihood parameter: sigma squared

thetas

(ndarray) Kriging hyperparameters.

X

(ndarray) Training input values, normalized.

X_mean

(ndarray) Mean of training input values, normalized.

X_std

(ndarray) Standard deviation of training input values, normalized.

Y

(ndarray) Training model response values, normalized.

Y_mean

(ndarray) Mean of training model response values, normalized.

Y_std

(ndarray) Standard deviation of training model response values, normalized.

__init__(self, **kwargs)[source]

Initialize all attributes.

Parameters
**kwargsdict

options dictionary.

linearize(self, 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(self, 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(self, 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(self, 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.