This repository contains Python code for an example of deep learning model that classifies the ECG5000 dataset. The model is implemented using tensorflow. Hyperparameters are tuned using baysian optimization.
The ECG5000 dataset consists of 5000 ECG recordings, each annotated with labels indicating the corresponding cardiac condition or arrhythmia. The dataset is widely used in machine learning research for tasks such as classification and anomaly detection. https://timeseriesclassification.com/description.php?Dataset=ECG5000
To set up the project environment, follow these steps:
-
Clone this repository:
git clone https://github.com/amirouyanis/ecg-classification.git cd ecg-classification
-
Create a new virtual environment (recommended):
python -m venv env
-
Activate the virtual environment:
- Windows:
.\env\Scripts\activate
- Linux/macOS:
source env/bin/activate
-
Install Poetry (if not already installed):
pip install poetry
-
Install dependencies using Poetry:
poetry install
-
Run streamlit app
streamlit run src/time_series_classification/streamlit_app/app.py
-
(Optional) If you prefer Docker deployment, build the Docker image:
docker build -t ecg-classification .
docker run -p 8501:8501 ecg-classification
And go to http://localhost:8501/