GithubHelp home page GithubHelp logo

macbrig / zero-shot-ecg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mertduman/zero-shot-ecg

0.0 0.0 0.0 43.68 MB

A Personalized Zero-Shot ECG Anomaly Monitoring System: From Sparse Representation Based Domain Adaption to Energy Efficient Suspicious Beat Detection for a Practical ECG Surveillance

Python 10.04% Jupyter Notebook 89.96%

zero-shot-ecg's Introduction

A Personalized Zero-Shot ECG Arrhythmia Monitoring System

arXiv PWC

Results

Method Accuracy Specificity Precision Recall F1-Score
Kiranyaz et al. 0.959 0.971 0.842 0.888 0.864
Zhai et al. 0.968 0.976 0.879 0.920 0.899
Li et al. 0.920 0.918 0.628 0.933 0.751
Zhou et al. 0.979 0.989 0.908 0.897 0.902
SAE-based 0.947 0.968 0.779 0.794 0.786
NPE-based (ours) 0.947 0.968 0.779 0.794 0.786
ABS 0.977 0.995 0.956 0.825 0.886
Domain Adaptation (ours) 0.978 0.987 0.911 0.907 0.909
Ensemble (ours) 0.982 0.988 0.919 0.937 0.928

Personalized classifiers.
Zero-shot classifiers.

Setup

Python (3.8.10) dependencies:

  • matplotlib (3.4.2), numpy (1.19.5), scipy (1.6.3), pandas (1.2.4), seaborn (0.11.1, optional)
  • torch (1.10.2+cu113)
  • wfdb (3.3.0)
  • import_ipynb (0.1.3)

To minimize conflict, our versions are given as reference.

Replicating Our Results

  1. Download the MIT-BIH Arrhythmia Database.
  2. Run ecg_beat_extraction.ipynb twice to generate single beats and beat-trios.
    • There should be 6 files generated.
  3. Run ecg_dataset_preparation.ipynb twice to generate datasets from single beats and beat-trios.
    • This generates dictionaries for each user. Save the dictionaries for single beats (and optionally for beat-trios).
    • We perform domain adaptation at this stage using the generated dictionaries for each user.
    • There should be 68 dataset files generated, and dictionaries for each user.
  4. To train your own classifier, go to train.ipynb. Otherwise, skip this part.
  5. To test with pretrained weights go to pretrained_*.ipynb files.

zero-shot-ecg's People

Contributors

mertduman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.