ForeTiS.model._tensorflow_model

Module Contents

Classes

TensorflowModel

Parent class based on BaseModel for all TensorFlow models to share functionalities.

class ForeTiS.model._tensorflow_model.TensorflowModel(optuna_trial, datasets, featureset_name, optimize_featureset, pca_transform=None, target_column=None)

Bases: ForeTiS.model._base_model.BaseModel, abc.ABC

Parent class based on BaseModel for all TensorFlow models to share functionalities. See BaseModel for more information.

Attributes

Inherited attributes

See BaseModel.

Additional attributes

  • x_scaler (sklearn.preprocessing.StandardScaler): Standard scaler for the x data

  • y_scaler (sklearn.preprocessing.StandardScaler): Standard scaler for the y data

Parameters:
  • optuna_trial (optuna.trial.Trial) –

  • datasets (list) –

  • featureset_name (str) –

  • optimize_featureset (bool) –

  • pca_transform (bool) –

  • target_column (str) –

define_model()

Definition of the actual prediction model.

See BaseModel for more information.

Return type:

gpflow.models.GPR

retrain(retrain)

Implementation of the retraining for models with sklearn-like API. See BaseModel for more information

Parameters:

retrain (pandas.DataFrame) –

update(update, period)

Implementation of the retraining for models with sklearn-like API. See BaseModel for more information

Parameters:
  • update (pandas.DataFrame) –

  • period (int) –

predict(X_in)

Implementation of a prediction based on input features for models with sklearn-like API. See BaseModel for more information

Parameters:

X_in (pandas.DataFrame) –

Return type:

numpy.array

train_val_loop(train, val)

Implementation of a train and validation loop for models with sklearn-like API. See BaseModel for more information

Parameters:
  • train (pandas.DataFrame) –

  • val (pandas.DataFrame) –

Return type:

numpy.array

extend_kernel_combinations()

Function extending kernels list with combinations based on base_kernels

static common_hyperparams()

See BaseModel for more information on the format.

Return type:

dict