Surrogate Model

Contains the implementations for the surrogate modelling methods

Implements the supported surrogate modelling methods.

class calisim.surrogate.implementation.SurrogateModelMethod(calibration_func: Callable, specification: SurrogateModelMethodModel, engine: str = 'sklearn', implementation: CalibrationWorkflowBase | None = None)[source]

The surrogate modelling method class.

pydantic model calisim.surrogate.implementation.SurrogateModelMethodModel[source]

The surrogate modelling method data model.

Parameters:

BaseModel (CalibrationModel) – The calibration base model class.

Config:
  • arbitrary_types_allowed: bool = True

  • protected_namespaces: tuple = ()

Fields:
field batch_size: int = 1000

The batch size when training the surrogate model

field flatten_Y: bool = False

Flatten the simulation outputs

calisim.surrogate.implementation.get_implementations() dict[str, type[CalibrationWorkflowBase]][source]

Get the calibration implementations for surrogate modelling.

Returns:

The dictionary of

calibration implementations for surrogate modelling.

Return type:

Dict[str, type[CalibrationWorkflowBase]]

GPyTorch

Contains the implementations for surrogate modelling methods using GPyTorch

Implements the supported surrogate modelling methods using the GPyTorch library.

class calisim.surrogate.gpytorch_wrapper.GPyTorchSurrogateModel(calibration_func: Callable, specification: CalibrationModel, task: str)[source]

The GPyTorch surrogate modelling method class.

analyze() None[source]

Analyze the results of the simulation calibration procedure.

execute() None[source]

Execute the simulation calibration procedure.

Scikit-Learn

Contains the implementations for surrogate modelling methods using Scikit-Learn

Implements the supported surrogate modelling methods using the Scikit-Learn library.

class calisim.surrogate.sklearn_wrapper.SklearnSurrogateModel(calibration_func: Callable, specification: CalibrationModel, task: str)[source]

The Scikit-Learn surrogate modelling method class.

analyze() None[source]

Analyze the results of the simulation calibration procedure.

execute() None[source]

Execute the simulation calibration procedure.