Draft: Fix #103: Update load surrogates
This MR serves as a replacement for the current interface to TensorFlow, and implements the following features:
-
Definition of a new abstract class Transformer
, for transforming the input and output. Classes coded according to this interface can transform the data, both in-place and out-of-place, and provide the analytical gradient. Moreover, the object can be saved into an HDF5 file. -
Implementation of MinMaxScaler
from scikit-learn into the new interface. -
Implementation of StandardScaler
from scikit-learn into the new interface. -
Implementation of PowerTransformer
from scikit-learn into the new interface. -
Implementation of a SurrogateModel
class, that stores 1 generic surrogate model. It can save and load the model into 2 files, one for the model itself, and the other for the extra data, in HDF5 format. Thepredict_output()
function can apply an arbitrary number of input and output transformations. Thepredict_jacobian()
function provides the analytical gradient using the chain rule. -
Implementation of a TensorFlowModel
class, that encapsulates a TensorFlow model. -
Implementation of a SurrogateModelFamily
class, that stores several surrogate models and evaluates them in the respective regions of validity. -
Test for 100% coverage.