easypheno.model.mlp
Module Contents
Classes
Implementation of a class for a feedforward Multilayer Perceptron (MLP). |
- class easypheno.model.mlp.Mlp(task, optuna_trial, encoding=None, n_outputs=1, n_features=None, width_onehot=None, batch_size=None, n_epochs=None, early_stopping_point=None)
Bases:
easypheno.model._torch_model.TorchModel
Implementation of a class for a feedforward Multilayer Perceptron (MLP).
See
BaseModel
andTorchModel
for more information on the attributes.- Parameters
- standard_encoding = 012
- possible_encodings = ['012']
- define_model(self)
Definition of an MLP network.
Architecture:
N_LAYERS of (Linear + BatchNorm + Dropout)
Linear output layer
Number of units in the first linear layer and percentage decrease after each may be fixed or optimized.
- Return type
torch.nn.Sequential
- define_hyperparams_to_tune(self)
See
BaseModel
for more information on the format.See
TorchModel
for more information on hyperparameters common for all torch models.- Return type