ltbio.ml.supervised#
Overview#
Subpackages#
Submodules#
Classes#
- |
|
A Single Pipeline Unit is any agent that can act (use, process or make changes) to a collection (usually of Timeseries). |
Contents#
- class ltbio.ml.supervised.SupervisedTrainConditions(loss, optimizer=None, train_size: int = None, train_ratio: float = None, test_size: int = None, test_ratio: float = None, validation_ratio: float = None, epochs: int = None, learning_rate: float = None, batch_size: int = None, shuffle: bool = False, epoch_shuffle: bool = False, stop_at_deltaloss: float = None, patience: int = None, **hyperparameters)#
- check_it_has(attributes: Iterable[str])#
- static differences_between(sets_of_conditions: Collection) tuple[dict, Ellipsis]#
- class ltbio.ml.supervised.SupervisingTrainer(model: ltbio.ml.supervised.models.SupervisedModel.SupervisedModel, train_conditions: Collection[ltbio.ml.supervised.SupervisedTrainConditions.SupervisedTrainConditions], evaluation_metrics: Collection = None, name: str = None, save_report_to: str = None)#
Bases:
digraph inheritanceff28839a0d { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "PipelineUnit" [URL="../../pipeline/PipelineUnit/index.html#ltbio.pipeline.PipelineUnit.PipelineUnit",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Pipeline Units are the building blocks of Pipelines."]; "ABC" -> "PipelineUnit" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SinglePipelineUnit" [URL="../../pipeline/PipelineUnit/index.html#ltbio.pipeline.PipelineUnit.SinglePipelineUnit",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Single Pipeline Unit is any agent that can act (use, process or make changes) to a collection (usually of Timeseries)."]; "PipelineUnit" -> "SinglePipelineUnit" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "SinglePipelineUnit" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SupervisingTrainer" [URL="SupervisingTrainer/index.html#ltbio.ml.supervised.SupervisingTrainer.SupervisingTrainer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "SinglePipelineUnit" -> "SupervisingTrainer" [arrowsize=0.5,style="setlinewidth(0.5)"]; }ltbio.pipeline.PipelineUnit.SinglePipelineUnitA Single Pipeline Unit is any agent that can act (use, process or make changes) to a collection (usually of Timeseries). Following the Command design pattern, a SingleUnit is the abstract ‘Command’, so that Pipeline can execute various kinds of processing by calling the ‘apply’ method of each concrete unit.
E.g. Filter, Segmenter, FeatureExtractor, FeatureSelector, SupervisingTrainer, DecisionMaker Any subclass that implements ‘apply’.
Every subclass must define ‘apply’ and implement a concrete behaviour. To map the parameters’ names of ‘apply’ to the labels inside any arriving Packet, PIPELINE_INPUT_LABELS should be defined. To map the outputs to the labels of the resulting Packet, PIPELINE_OUTPUT_LABELS should be defined.
PIPELINE_INPUT_LABELS Maps every label of a needed input inside a Packet to the name of the corresponding ‘apply’ parameter. PIPELINE_OUTPUT_LABELS Maps every output name of ‘apply’ to a label to be saved inside a Packet.
- ART_PATH = 'resources/pipeline_media/ml.png'#
- PIPELINE_INPUT_LABELS#
- PIPELINE_OUTPUT_LABELS#
- apply(dataset: ltbio.ml.datasets.BiosignalDataset.BiosignalDataset, test_dataset: ltbio.ml.datasets.BiosignalDataset.BiosignalDataset = None)#