Skip to content

Abstract interface for surrogate models

Etienne Lac requested to merge api/surrogates into master

Description

Define an abstract interface for surrogate models usable in System.make_surrogate, so that users can define their own models.

Main changes

  • Make SurrogateModel a pure interface, with abstract methods train and predict.
  • Define existing models as concrete implementations of SurrogateModel.
  • Implement a proxy pattern in SystemSurrogate, to encapsulate the trained/untrained logic previously coded in SystemSurrogate.

Side changes

  • Move module surrogate_models from cosapp.systems to cosapp.utils.
  • Refactoring pass in models and test files.

Merge request reports