https://github.com/horseee/physionet
Deep learning based ECG classification
https://github.com/horseee/physionet
deep-learning ecg tensorflow
Last synced: 10 months ago
JSON representation
Deep learning based ECG classification
- Host: GitHub
- URL: https://github.com/horseee/physionet
- Owner: horseee
- Created: 2018-06-12T06:06:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-25T05:51:28.000Z (about 8 years ago)
- Last Synced: 2024-12-29T13:45:26.318Z (over 1 year ago)
- Topics: deep-learning, ecg, tensorflow
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 17
- Watchers: 5
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## ECG classification
#### Dataset
[physionet challenge 2017](https://www.physionet.org/challenge/2017/)

#### Requirements
* tensorflow
* numpy
* scipy
* pandas
Also, you can use the command `pip3 install -r requirements.txt` to install the dependency packages.
In this project, both python2 and python3 are ok(But we strongly suggest that you use python3).
#### How to Run
1. Put the data set in folder.
2. Run `merge_dataset.py` to create **train.mat** and **test.mat**. Use the following command to run the code.
```
python3 merge_dataset.py --dir YOUR_TRAINING_SET_FOLDER_NAME
```
Use `python3 merge_dataset.py -h` if you need some help.
3. Run `train.py`. You can choose your parameter for the following parameters in your command.
* learning_rate
* epochs
* batch_size.
* k_folder: True/False.
If you want to begin the process for k-folder validation, use the following command: `python3 train.py --k_folder True`. If you only want to train the model, use the command: `python3 train.py`.
Use `python3 train.py -h` if you need some help.
4. After you train the model, use `test.py` to test the accuracy and F1 rate. The default path for checkpoints is **checkpoints/**. If you use other path, run the test.py use the following command:
```
python3 test.py --check_point_folder YOUR_CHECKPOINT_FOLDER_PATH
```
#### Experiment result
The F1 for our model is **0.82**. But maybe if you run you will get a different number for that the training and testing set is randomly choose.