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

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

__init__
(**kwargs)¶ Initialize all attributes.
 Parameters
 **kwargsdict
options dictionary.

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

predict
(x)¶ Calculate a predicted value of the response based on the current trained model.
 Parameters
 xarraylike
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
 xarraylike
Point(s) at which the surrogate is evaluated.
 yarraylike
Model responses at given inputs.

train_multifi
(x, y)[source]¶ Train the surrogate model, based on the given multifidelity training data.
 Parameters
 xlist of (m samples, n inputs) ndarrays
Values representing the multifidelity training case inputs.
 ylist 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
 xarraylike
Vectorized point(s) at which the surrogate is evaluated.


class
openmdao.surrogate_models.surrogate_model.
SurrogateModel
(**kwargs)[source]¶ Bases:
object
Base class for surrogate models.
Attributes
options
(<OptionsDictionary>) Dictionary with general pyoptsparse options.
trained
(bool) True when surrogate has been trained.

linearize
(x)[source]¶ Calculate the jacobian of the interpolant at the requested point.
 Parameters
 xarraylike
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
 xarraylike
Point(s) at which the surrogate is evaluated.
