easypheno.model._sklearn_model

Module Contents

Classes

SklearnModel

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

class easypheno.model._sklearn_model.SklearnModel(task, optuna_trial, encoding=None, n_outputs=1)

Bases: easypheno.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
  • task (str) –

  • optuna_trial (optuna.trial.Trial) –

  • encoding (str) –

  • n_outputs (int) –

retrain(self, X_retrain, y_retrain)

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

Parameters
  • X_retrain (numpy.array) –

  • y_retrain (numpy.array) –

predict(self, X_in)

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

Parameters

X_in (numpy.array) –

Return type

numpy.array

train_val_loop(self, X_train, y_train, X_val, y_val)

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

Parameters
  • X_train (numpy.array) –

  • y_train (numpy.array) –

  • X_val (numpy.array) –

  • y_val (numpy.array) –

Return type

numpy.array