cosapp.utils.surrogate_models.base

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

Classes

MultiFiSurrogateModel()

Base class for surrogate models using multi-fidelity training data.

SurrogateModel()

Abstract interface for surrogate models.

class cosapp.utils.surrogate_models.base.MultiFiSurrogateModel[source]

Bases: SurrogateModel

Base class for surrogate models using multi-fidelity training data.

train(x, y)[source]

Calculate a predicted value of the response based on the current trained model.

Parameters:
  • x (array-like) – Point(s) at which the surrogate is evaluated.

  • y (array-like) – Model responses at given inputs.

abstract train_multifi(x, y)[source]

Train the surrogate model, based on the given multi-fidelity training data.

Parameters:
  • x (list of (m samples, n inputs) ndarrays) – Values representing the multi-fidelity training case inputs.

  • y (list of ndarray) – output training values which corresponds to the multi-fidelity training case input given by x.

class cosapp.utils.surrogate_models.base.SurrogateModel[source]

Bases: ABC

Abstract interface for surrogate models.

abstract predict(x)[source]

Calculate a predicted value of the response based on the current trained model.

Parameters:

x (array-like) – Point(s) at which the surrogate is evaluated.

abstract train(x, y)[source]

Train the surrogate model with the given set of inputs and outputs.

Parameters:
  • x (array-like) – Training input locations

  • y (array-like) – Model responses at given inputs.