Variational Autoencoder for ECG heartbeat dataset
Given a heartbeat, need to detect whether heart beat is normal or abnormal. If it is detected as abnormal, how much severe is the condition of patient.
Physionet dataset: https://www.physionet.org/challenge/2016/sources/
Implemented a variational AutoEncoder which will be trained on only normal heartbeat dataset. The trained model will learn the representation of normal heartbeat using VAE. Now given a heartbeat to model, if loss of the model is greater than a certain threshold, it will be classified as abnormal heartbeat. Apart from that, more the difference of loss from threshold, more is the severity of the patient.
Use dynamic RNN model to feed the heartbeat of different sizes and train on both normal and abnormal dataset. And classify it into normal and normal heartbeat. The sequence to sequence model might work much better in learning the representation of data as data is sequential in nature.
- Seq2Seq only
- Seq2Seq + Attention
- Attention only
Python used = 3.5.4 Create an python environment and install requirements specified in requirements.txt.
Variational_AutoEncoder_ECG_Final.ipynb is used to perform training and check results.
Inference.ipynb is used to perform inference on sample RR interval of ECG dataset.
Save folder contains the saved graph and weights which is being used in Inference.