easypheno.model._template_sklearn_model
Module Contents
Classes
Template file for a prediction model based on |
- class easypheno.model._template_sklearn_model.TemplateSklearnModel(task, optuna_trial, encoding=None, n_outputs=1)
Bases:
easypheno.model._sklearn_model.SklearnModel
Template file for a prediction model based on
SklearnModel
See
BaseModel
for more information on the attributes.Steps you have to do to add your own model:
Copy this template file and rename it according to your model (will be the name to call it later on on the command line)
Rename the class and add it to easypheno.model.__init__.py
Adjust the class attributes if necessary
Define your model in define_model()
Define the hyperparameters and ranges you want to use for optimization in define_hyperparams_to_tune()
Test your new prediction model using toy data
- standard_encoding = Ellipsis
- possible_encodings = [Ellipsis]
- define_model(self)
Definition of the actual prediction model.
Use param = self.suggest_hyperparam_to_optuna(PARAM_NAME_IN_DEFINE_HYPERPARAMS_TO_TUNE) if you want to use the value of a hyperparameter that should be optimized. The function needs to return the model object.
See
BaseModel
for more information.