Disentangled Representational Learning of Single Lead Electrocardiogram Signals using Variational Autoencoder
This work focuses on clustering 1-lead electrocardiogram (ECG) heartbeats using beta total correlation variational autoencoder (
To get started with the project, follow these steps:
- Make sure you have Python version 3.10 installed.
- Create a virtual environment
- Install the required libraries by running the following command in the project directory. Some requirements might need adjustemnt depending on your hardware and OS:
conda create -n ecg python=3.10
conda activate ecg
pip install -r requirements.txt
The raw ECG data is available in a remote repository and needs to be downloaded and built. Therefore, perform the following steps:
- Clone the ECG-TFDS repository:
git clone https://github.com/CardioKit/ECG-TFDS
- Install the requirements for ECG-TFDS:
pip install -r ./ECG-TFDS/requirements.txt
- Change to the ECG-TFDS source directory (e.g., Zheng's dataset):
cd ./ECG-TFDS/src/zheng
- Build the dataset:
tfds build --register_checksums
Execute the main file to run the code:
python main.py
The main file requires a configuration file for parameterization:
options:
-h, --help show this help message and exit
-p, --path_config location of the params file (default: ./params.yml)
The results of the runs can be analyzed with the jupyter notebook:
./analysis/article.ipynb
If you want to either use code or refer to results, please cite the following article: (To be determined)
@article{kapsecker2024disentangled,
title={Disentangled Representational Learning of Single Lead Electrocardiogram Signals using Variational Autoencoder},
author={Kapsecker, Maximilian and Möller, Matthias C and Jonas, Stephan M},
journal={TBD},
volume={TBD},
number={TBD},
pages={TBD},
year={TBD},
publisher={TBD}
}