Metadata-Version: 2.1
Name: ecg-qc
Version: 1.0b5
Summary: a package to compute if ECG signal quality is optimal or noisy
Home-page: https://github.com/Aura-healthcare/ecg_qc
Author: Alexandre CHIROUZE, Alexis COMTE, Laura DUMONT
Author-email: alexandre@chirouze.tech, alexis.g.comte@gmail.com, laura.dt.dumont@gmail.com
License: GPLv3
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Healthcare Industry
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: biosppy (>=0.6.1)
Requires-Dist: dill (>=0.3.4)
Requires-Dist: numpy (>=1.19.5)
Requires-Dist: pathtools (>=0.1.2)
Requires-Dist: py-ecg-detectors (>=1.0.2)
Requires-Dist: scikit-learn (>=0.24.2)
Requires-Dist: wfdb (>=3.1.1)
Requires-Dist: xgboost (>=1.3.1)

# ECG_QC (Quality Classification)


[![PyPI version](https://badge.fury.io/py/ecg-qc.svg)](https://badge.fury.io/py/ecg-qc)
[![Build Status](https://travis-ci.com/Aura-healthcare/ecg_qc.svg?branch=main)](https://travis-ci.com/Aura-healthcare/ecg_qc)
[![codecov](https://codecov.io/gh/Aura-healthcare/ecg_qc/branch/main/graph/badge.svg?token=8QZ5G68SF2)](https://codecov.io/gh/Aura-healthcare/ecg_qc)
[![CodeFactor](https://www.codefactor.io/repository/github/aura-healthcare/ecg_qc/badge)](https://www.codefactor.io/repository/github/aura-healthcare/ecg_qc)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Downloads](https://pepy.tech/badge/ecg-qc)](https://pepy.tech/project/ecg-qc)

[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-white.svg)](https://sonarcloud.io/dashboard?id=Aura-healthcare_ecg_qc)

![alt text](docs/source/images/ecg_signal_classification.png)

**Full Documentation** : https://aura-healthcare.github.io/ecg_qc/

**Website** : https://www.aura.healthcare

**Github** : https://github.com/Aura-healthcare

**Version** : 1.0b5

## Installation / Prerequisites

#### Dependencies

ecg_qc requires:

- Python (>= 3.6)
- biosppy>=0.6.1
- dill>=0.3.4
- pathtools>=0.1.2
- py-ecg-detectors>=1.0.2
- scikit-learn>=0.23.2
- wfdb>=3.1.1
- xgboost>=1.3.1

#### User installation

The easiest way to install hrv-analysis is using ``pip`` :

    $ pip install ecg-qc

you can also clone the repository:

    $ git clone https://github.com/Aura-healthcare/ecg_qc.git
    $ python setup.py install


## Getting started

### Usage

Import:

```python
from ecg_qc import EcgQc
```

Class initialization:

```python
ecg_qc = EcgQc()
```

Default parameters:

```python
ecg_qc = EcgQc(model='ecg_qc/trained_models/xgb_9s.joblib',
               sampling_frequency=1000,
               normalized=False)
```

Predicting the quality of the signal:

```python
ecg_data = [1905.72, ... -150.75995323, -134.14559104] # ECG values with same sampling frequency as class declaration

signal_quality = ecg_qc.get_signal_quality(ecg_data)
```

Computing SQIs before making prediction:

```python
ecg_data = [1905.72, ... -150.75995323, -134.14559104] # ECG values with same sampling frequency as class declaration

sqi_scores = ecg_qc.compute_sqi_score(ecg_data)
signal_quality = ecg_qc.predict_quality(sqi_scores)
```


## Authors

**Alexandre CHIROUZE** - (https://github.com/achirouze)

**Alexis COMTE** - (https://github.com/alexisgcomte)

**Laura DUMONT** - (https://github.com/laudmt)

## License

This project is licensed under the *GNU GENERAL PUBLIC License* - see the [LICENSE.md](https://github.com/Aura-healthcare/ecg_qc/blob/main/LICENSE) file for details


References
==========
Nemcova, A., Smisek, R., Opravilová, K., Vitek, M., Smital, L., & Maršánová, L. (2020). Brno University of Technology ECG Quality Database (BUT QDB) (version 1.0.0). PhysioNet. https://doi.org/10.13026/kah4-0w24.

