ForeTiS.model._sklearn_model

Module Contents

Classes

SklearnModel

Parent class based on BaseModel for all models with a sklearn-like API to share

class ForeTiS.model._sklearn_model.SklearnModel(optuna_trial, datasets, featureset_name, pca_transform, target_column, optimize_featureset)

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

Parent class based on BaseModel for all models with a sklearn-like API to share functionalities. See BaseModel for more information.

Attributes

Inherited attributes

See BaseModel

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

  • datasets (list) –

  • featureset_name (str) –

  • pca_transform (bool) –

  • target_column (str) –

  • optimize_featureset (bool) –

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