peal.architectures.interfaces.TaskConfig¶
- class peal.architectures.interfaces.TaskConfig[source]¶
Bases:
BaseModelA dict of critirion names (that have to be implemented in peal.training.criterions) mapped to the weight. Like this the loss function can be post_hoc attached without changing the code.
Methods
Attributes
The mix between binary cross entropy loss and mse loss.
Gives the option to only use samples from one or more specified classes
The type of config.
The criterions used for training the model.
The alpha parameter of the focal loss.
The gamma parameter of the focal loss.
The mix between focal loss and mse loss.
The pos_weight parameter of the BCEWithLogitsLoss used for mixed BCE and MSE loss.
The output_channels that can be at most the output_channels of the dataset, but if a subtask is chosen the output_channels has also be adapted accordingly
The output_type that either can just be the output_type of the dataset or could be some possible subtype.
Gives the option to select a subset of the input variables.
Gives the option to select a subset of the output_variables.
- config_name: str = 'TaskConfig'¶
The type of config. This is necessary to find config class from yaml config
- mixed_bce_pos_weight: float = 1.0¶
The pos_weight parameter of the BCEWithLogitsLoss used for mixed BCE and MSE loss.
- output_type: str = 'singleclass'¶
The output_type that either can just be the output_type of the dataset or could be some possible subtype. E.g. when having a binary multiclass dataset one could use as task binary single class classification for one of the output variables.
- output_channels: pydantic.PositiveInt = 2¶
The output_channels that can be at most the output_channels of the dataset, but if a subtask is chosen the output_channels has also be adapted accordingly
- x_selection: list[str] | None = None¶
Gives the option to select a subset of the input variables. Only works for symbolic data.