kriging.py¶
Surrogate model based on Kriging.

class
openmdao.surrogate_models.kriging.
FloatKrigingSurrogate
(nugget=2.2204460492503131e15, eval_rmse=False)[source]¶ Bases:
openmdao.surrogate_models.kriging.KrigingSurrogate
Surrogate model based on the simple Kriging interpolation.
Predictions are returned as floats, which are the mean of the model’s prediction.

__init__
(nugget=2.2204460492503131e15, eval_rmse=False)¶ Initialize all attributes.
Parameters: nugget : double or ndarray, optional
Nugget smoothing parameter for smoothing noisy data. Represents the variance of the input values. If nugget is an ndarray, it must be of the same length as the number of training points. Default: 10. * Machine Epsilon
eval_rmse : bool
Flag indicating whether the Root Mean Squared Error (RMSE) should be computed. Set to False by default.

linearize
(x)¶ Calculate the jacobian of the Kriging surface at the requested point.
Parameters: x : arraylike
Point at which the surrogate Jacobian is evaluated.
Returns: ndarray
Jacobian of surrogate output wrt inputs.

predict
(x)[source]¶ Calculate predicted value of response based on the current trained model.
Parameters: x : arraylike
Point at which the surrogate is evaluated.
Returns: float
Mean value of kriging prediction.

train
(x, y)¶ Train the surrogate model with the given set of inputs and outputs.
Parameters: x : arraylike
Training input locations
y : arraylike
Model responses at given inputs.

vectorized_predict
(x)¶ Calculate predicted values of the response based on the current trained model.
Parameters: x : arraylike
Vectorized point(s) at which the surrogate is evaluated.


class
openmdao.surrogate_models.kriging.
KrigingSurrogate
(nugget=2.2204460492503131e15, eval_rmse=False)[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: scikitlearn).
Attributes
alpha (ndarray) Reduced likelyhood parameter: alpha eval_rmse (bool) When true, calculate the root mean square prediction error. L (ndarray) Reduced likelyhood parameter: L n_dims (int) Number of independents in the surrogate n_samples (int) Number of training points. nugget (double or ndarray, optional) Nugget smoothing parameter for smoothing noisy data. Represents the variance of the input values. If nugget is an ndarray, it must be of the same length as the number of training points. Default: 10. * Machine Epsilon sigma2 (ndarray) Reduced likelyhood 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__
(nugget=2.2204460492503131e15, eval_rmse=False)[source]¶ Initialize all attributes.
Parameters: nugget : double or ndarray, optional
Nugget smoothing parameter for smoothing noisy data. Represents the variance of the input values. If nugget is an ndarray, it must be of the same length as the number of training points. Default: 10. * Machine Epsilon
eval_rmse : bool
Flag indicating whether the Root Mean Squared Error (RMSE) should be computed. Set to False by default.

linearize
(x)[source]¶ Calculate the jacobian of the Kriging surface at the requested point.
Parameters: x : arraylike
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: x : arraylike
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: x : arraylike
Training input locations
y : arraylike
Model responses at given inputs.

vectorized_predict
(x)¶ Calculate predicted values of the response based on the current trained model.
Parameters: x : arraylike
Vectorized point(s) at which the surrogate is evaluated.
