torch_ecg.components

This module contains the components for training and evaluating models.

Input classes

InputConfig(*args, input_type, n_channels[, ...])

A Class to store the configuration of the input.

WaveformInput(config)

Waveform input.

FFTInput(config)

Inputs from the FFT, via concatenating the amplitudes and the phases.

SpectrogramInput(config)

Inputs from the spectro-temporal domain.

Output classes

ClassificationOutput(*args, **kwargs)

Class that maintains the output of a (typically single-label) classification task.

MultiLabelClassificationOutput(*args, **kwargs)

Class that maintains the output of a multi-label classification task.

SequenceTaggingOutput

alias of SequenceTaggingOutput

SequenceLabellingOutput(*args, **kwargs)

Class that maintains the output of a sequence tagging task.

WaveDelineationOutput(*args, **kwargs)

Class that maintains the output of a wave delineation task.

RPeaksDetectionOutput(*args, **kwargs)

Class that maintains the output of an R peaks detection task.

Loggers

LoggerManager([log_dir, log_suffix])

Manager of loggers.

Metrics

ClassificationMetrics([multi_label, macro, ...])

Metrics for the task of classification.

RPeaksDetectionMetrics([thr, extra_metrics])

Metrics for the task of R peaks detection, as proposed in CPSC2019.

WaveDelineationMetrics([macro, tol, ...])

Metrics for the task of ECG wave delineation.

Trainer

BaseTrainer(model, dataset_cls, ...[, ...])

Abstract base class for trainers.