surrogate_model.py¶
Class definition for SurrogateModel, the base class for all surrogate models.

class
openmdao.surrogate_models.surrogate_model.
MultiFiSurrogateModel
[source]¶ Bases:
openmdao.surrogate_models.surrogate_model.SurrogateModel
Base class for surrogate models using multifidelity training data.

__init__
()¶ Initialize all attributes.

linearize
(x)¶ Calculate the jacobian of the interpolant at the requested point.
Parameters: x : arraylike
Point at which the surrogate Jacobian is evaluated.

predict
(x)¶ Calculate a predicted value of the response based on the current trained model.
Parameters: x : arraylike
Point(s) at which the surrogate is evaluated.

train
(x, y)[source]¶ Calculate a predicted value of the response based on the current trained model.
Parameters: x : arraylike
Point(s) at which the surrogate is evaluated.
y : arraylike
Model responses at given inputs.

train_multifi
(x, y)[source]¶ Train the surrogate model, based on the given multifidelity training data.
Parameters: x : list of (m samples, n inputs) ndarrays
Values representing the multifidelity training case inputs.
y : list of ndarray
output training values which corresponds to the multifidelity training case input given by x.

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.surrogate_model.
SurrogateModel
[source]¶ Bases:
object
Base class for surrogate models.
Attributes
trained (bool) True when surrogate has been trained. 
linearize
(x)[source]¶ Calculate the jacobian of the interpolant at the requested point.
Parameters: x : arraylike
Point at which the surrogate Jacobian is evaluated.

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