Supported Functionality
This page serves as a concise overview of datasets and preprocessing, training and evaluation methods currently supported by ECGAN.
Note
Not all preprocessing methods supported by the framework are used for every dataset and not every metric is in use for every method. If you feel like we are missing crucial preprocessing or evaluation steps please get in touch!
Supported Datasets
The dataset can best be set during initialization using the -b
flag followed by the identifier below.
We currently support the following datasets out of the box:
Dataset |
Identifier |
Dataset |
Retriever |
Preprocessor |
---|---|---|---|---|
MITBIH 1 |
|
Not supported |
||
|
|
|
||
|
|
|||
Shaoxing 2 |
|
|||
PTB 3 |
|
|
|
|
Synthetic sine 4 |
|
Not supported |
||
ecgan.preprocessing.data_retrieval.SineDataRetriever
.Additional public ECG datasets which are currently not supported include the recent PTB-XL from Wagner et al. 2020 and ECG 5000. More information on ECG datasets can be found on the PhysioNet Database.
Not all datasets are suitable for all tasks, the quality of the Shaoxing dataset is for example not necessarily high enough for reliable data generation. We hope to add more information and in-depth evaluations for the supported datasets in the future.
Supported Preprocessing
The preprocessing is not set as a flag during initialization, but can be changed after initialization, before starting ecgan-preprocess
.
Most importantly, you can select the sequence length (TARGET_SEQUENCE_LENGTH
) and downsample or upsample the data.
This is very important since the sequence length can be very important for the performance of a model
and sometimes needs to be downsampled for computational requirements or upsampled to be a good fit
for an existing architecture with a specific sequence length in mind.
For downsampling we suggest using LTTB downsampling (DOWNSAMPLE_ALGO: lttb
) to retain the structure of the time series.
For upsampling we support the torch interpolation (DOWNSAMPLE_ALGO: interpolate
) which uses linear interpolation between the values.
Supported Training
During training data is split into n Folds (CROSS_VAL_FOLDS
in the configuration file).
Many parameters such the desired (amount of) channels (either a list for the selected indices or an integer m
to take the first m channels), flags to indicate if data shall be masked for binary classification
(BINARY_LABELS
), transformations such as various normalizations or the Fourier transform (TRANSFORMATION
)
can be set. It is further possible to train solely on healthy data which can be useful for some tasks such
as various generative tasks.
Other parameters which are of relevance for training many models (currently focusing deep learning models)
can be set freely such as the amount of epochs or the batch size.
Supported Models
Can be selected using the -m
flag.
Data generation/synthesis:
Traditional GAN based models (especially DCGAN/RGAN) with a variety of Loss functions. Usage
-m dcgan
,-m rgan
,-m rdcgan
.Autoencoder based GANs: using a (variational) autoencoder. Usage
-m aegan
,-m vaegan
.
Data classification:
Simple RNN for (multiclass as well as single class) classification. Usage
-m rnn
.Simple CNN for (multiclass as well as single class) classification. Usage
-m cnn
.
Supported trackers
Training and evaluation can be tracked using Tracker which can be set using the TRACKER
parameter in the experiment config. Currently supported options are local tracking (TRACKER: local
)
and Weights and Biases (TRACKER: wb
). While local tracking is set as a default to not force people to
sign up for another service to test ecgan, we strongly recommend Weights and Biases!
Further downstream tasks
The most important downstream tasks is the anomaly detection, see Anomaly Detection for detailed information. Supported techniques currently focus on pretrained models and include both, classification as well as generative models.
Additionally, inverse mappings can be trained for selected deep generative models. See Inverse Mapping for more information.