This project focuses on developing a Bayesian Neural Network model to analyze physiological signals, specifically Electrocardiogram (ECG) data. The primary goal is to accurately model ECG signals while quantifying the model's uncertainty. The implementation consists of a Convolutional Autoencoder architecture that processes ECG signals and applies approximate Bayesian inference using Monte Carlo dropout. This approach provides a robust way to model ECG signals, enabling better understanding and interpretation of the data while accounting for uncertainties. The project utilizes ECG data from the EPHNOGRAM database, and the implemented model has undergone several iterations to optimize its performance.
pandas
numpy
matplotlib
keras
tensorflow
sklearn
scipy
- Clone the project by using
git clone https://github.com/hamza-mughees/ECG-Modelling.git
- Insall the data from the EPHNOGRAM database and place it into the root directory.
- Create a
res
directory in root. - Navigate into the
src
directory. - Create the data:
- For a single patient, run
python create_data_singlePatient.py
- For all patients, run
python create_data_allPatients.py
- For a single patient, run
- Train the model: run
python autoencoder.py
.- For bayesian inference, make sure to assign
True
to thebayes
variable inglobals.py
.
- For bayesian inference, make sure to assign
- To analyze a trained model, run
performance.py
. Update the ID to that of the model in theout
directory. The latest model would always be the one at the very bottom.