Sklearn Model Definitions

This module contains the functions to save, load and train sklearn models.

myogestic.models.definitions.sklearn_models.load(model_path, _)[source]

Load a sklearn model.

Parameters:
  • model_path (str) – The path to load the model.

  • _ (Any) – A new instance of the sklearn model. This instance is not used to load the model.

Returns:

The loaded sklearn model

Return type:

Any

myogestic.models.definitions.sklearn_models.save(model_path, model)[source]

Save a sklearn model.

Parameters:
  • model_path (str) – The path to save the model.

  • model (Any) – The sklearn model to save.

Returns:

The path where the model was saved.

Return type:

str

myogestic.models.definitions.sklearn_models.train(model, x_train, y_train, _)[source]

Train a sklearn model.

Parameters:
  • model (Any) – The sklearn model to train.

  • x_train (Any) – The input data to train the model.

  • y_train (Any) – The target data to train the model.

  • _ (CustomLogger) – The logger to log the training process. This parameter is not used.

Returns:

The trained sklearn model.

Return type:

Any