Skip to content

Commit 109161f

Browse files
authored
Merge pull request #3 from analysiscenter/install
Fix install requirements
2 parents 0380272 + 6d4f858 commit 109161f

File tree

3 files changed

+63
-52
lines changed

3 files changed

+63
-52
lines changed

README.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
1-
# CardIO
1+
# CardIO
22

3-
CardIO is a library that works with electrocardiograms (ECG). With CardIO you can
3+
`CardIO` is designed to build end-to-end machine learning models for deep research of electrocardiograms.
44

5-
* load and save signal in various formats
6-
* resample, crop, filter and flip signal
7-
* allocate PQ, QT, QRS segments
8-
* calculate heart rate and other standard ECG characteristics
9-
* apply complex transformations like fft and wavelets, or any other custom functions.
10-
* recognize heart diseases from ECG
11-
* efficiently work with large datasets that do not even fit into memory
12-
* easily arrange new custom actions into pipelines
13-
* do end-to-end ECG processing
14-
* build, train and test custom models for deep research
5+
Main features:
156

16-
… and do everything under a single API.
7+
* load and save signal in various formats (wfdb, blosc, etc)
8+
* resample, crop, flip and filter signals
9+
* detect PQ, QT, QRS segments
10+
* calculate heart rate and other ECG characteristics
11+
* apply complex transformations like fft and wavelets, as well as custom functions
12+
* recognize heart diseases (e.g. atrial fibrillation)
13+
* efficiently work with large datasets that do not even fit into memory
14+
* perform end-to-end ECG processing
15+
* build, train and test neural networks and other machine learning models.
1716

1817
For more details see [the documentation and tutorials](https://analysiscenter.github.io/cardio/).
1918

19+
2020
## About CardIO
2121

22-
The library is based on [Dataset](https://github.com/analysiscenter/dataset/). We suggest to read Dataset's [documentation](https://analysiscenter.github.io/dataset/) to learn more.
22+
> CardIO is based on [Dataset](https://github.com/analysiscenter/dataset). You might benefit from reading [its documentation](https://analysiscenter.github.io/dataset).
23+
However, it is not required, especially at the beginning.
2324

24-
CardIO has three modules: [```batch```](https://analysiscenter.github.io/cardio/intro/batch.html) [```models```](https://analysiscenter.github.io/cardio/intro/models.html) and [```pipelines```](https://analysiscenter.github.io/cardio/intro/pipeline.html).
25+
CardIO has three modules: [``batch``](https://analysiscenter.github.io/cardio/intro/batch.html),
26+
[``models``](https://analysiscenter.github.io/cardio/intro/models.html) and
27+
[``pipelines``](https://analysiscenter.github.io/cardio/intro/pipeline.html).
2528

26-
Module ```batch``` contains low-level actions for ECG processing.
27-
Actions are included in ```EcgBatch``` class that also defines how
28-
to store ECGs. From these actions you can biuld new pipelines. You can also
29-
write custom action and include it in ```EcgBatch```.
29+
``batch`` module contains ``EcgBatch`` class which defines how ECG are stored and includes actions for ECG processing.
30+
These actions might be used to build multi-staged workflows that can also involve machine learning models.
3031

31-
In ```models``` we provide several models that were elaborated to learn the most important problems in ECG:
32-
* how to recognize specific features of ECG like R-peaks, P-wave, T-wave
33-
* how to recognize heart diseases from ECG, for example - atrial fibrillation.
32+
``models`` module provides several ready to use models for important problems in ECG analysis:
33+
* how to detect specific features of ECG like R-peaks, P-wave, T-wave, etc;
34+
* how to recognize heart diseases from ECG, for example, atrial fibrillation.
3435

35-
Module ```pipelines``` contains high-level methods that
36-
* train model to allocate PQ, QT, QRS segments
36+
``pipelines`` module contains predefined workflows to
37+
* train a model to detect PQ, QT, QRS segments
3738
* calculate heart rate
38-
* train model to find probabilities of heart diseases.
39+
* train a model to find probabilities of heart diseases, in particular, atrial fibrillation.
40+
41+
Under the hood these methods contain actions that load signals, filter it and do complex calculations.
3942

40-
Under the hood these methods contain many actions that load signals, filter it and do complex caclulations. Using pipelines you do not think about this part of work and simply pass ECG datasets and get results.
4143

4244
## Basic usage
4345

44-
Here is an example of pipeline that loads ECG signals, makes some preprocessing and learns model over 50 epochs.
46+
Here is an example of pipeline that loads ECG signals, makes preprocessing and train a model over 50 epochs:
4547
```python
4648
train_pipeline = (
4749
dataset.train
@@ -62,15 +64,15 @@ train_pipeline = (
6264
)
6365
```
6466

65-
As a result of this pipeline one obtains a trained model.
6667

6768
## Installation
6869

6970
> `CardIO` module is in the beta stage. Your suggestions and improvements are very welcome.
7071
7172
> `CardIO` supports python 3.5 or higher.
7273
73-
### Installation as python package
74+
75+
### Installation as a python package
7476

7577
With [pipenv](https://docs.pipenv.org/):
7678

@@ -85,13 +87,16 @@ After that just import `cardio`:
8587
import cardio
8688
```
8789

90+
8891
### Installation as a project repository:
8992

93+
When cloning repo from GitHub use flag ``--recursive`` to make sure that ``Dataset`` submodule is also cloned.
94+
9095
git clone --recursive https://github.com/analysiscenter/cardio.git
9196

92-
Flag `--recursive` is used to clone submodules.
9397

9498
## Citing CardIO
99+
95100
Please cite CardIO in your publications if it helps your research.
96101

97102
Khudorozhkov R., Illarionov E., Kuvaev A., Podvyaznikov D. CardIO library for data science research of heart signals. 2017.

docs/index.rst

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
===================================
22
Welcome to CardIO's documentation!
33
===================================
4-
`CardIO` is a library designed to build end-to-end machine learning models for deep research of electrocardiograms.
4+
`CardIO` is designed to build end-to-end machine learning models for deep research of electrocardiograms.
55

66
Main features:
77

8-
* load and save signal in a number of formats
9-
* resample, crop and flip signal
10-
* filter signal
11-
* allocate PQ, QT, QRS segments
12-
* calculate heart rate and find other standard ECG characteristics
13-
* apply complex transformations like fft and wavelets, or any other custom functions.
14-
* recognize heart diseases from ECG
8+
* load and save signal in various formats (wfdb, blosc, etc)
9+
* resample, crop, flip and filter signals
10+
* detect PQ, QT, QRS segments
11+
* calculate heart rate and other ECG characteristics
12+
* apply complex transformations like fft and wavelets, as well as custom functions
13+
* recognize heart diseases (e.g. atrial fibrillation)
1514
* efficiently work with large datasets that do not even fit into memory
16-
* easily arrange new custom actions into pipelines
17-
* do end-to-end ECG processing
18-
* build, train and test custom models for deep research
15+
* perform end-to-end ECG processing
16+
* build, train and test neural networks and other machine learning models.
1917

20-
… and do everything under a single API.
2118

22-
The library is based on `Dataset <https://github.com/analysiscenter/dataset>`_. We suggest to read Dataset's documentation to learn more, however, you may skip it for the first reading.
19+
.. note:: CardIO is based on `Dataset <https://github.com/analysiscenter/dataset>`_. You might benefit from reading `its documentation <https://analysiscenter.github.io/dataset>`_. However, it is not required, especially at the beginning.
2320

2421
CardIO has three modules: :doc:`batch <./api/cardio.batch>`, :doc:`models <./api/cardio.models>` and :doc:`pipelines <api/cardio.pipelines>`.
2522

26-
Module batch contains low-level actions for ECG processing. Actions are included in EcgBatch class that also defines how to store ECGs. From these actions you can build new pipelines. You can also write custom action and include it in EcgBatch.
2723

28-
In models we provide several models that were elaborated to learn the most important problems in ECG:
24+
``batch`` module contains ``EcgBatch`` class which defines how ECG are stored and includes actions for ECG processing.
25+
These actions might be used to build multi-staged workflows that can also involve machine learning models.
2926

30-
* how to recognize specific features of ECG like R-peaks, P-wave, T-wave
31-
* how to recognize heart diseases from ECG, for example - atrial fibrillation.
27+
``models`` module provides several ready to use models for important problems in ECG analysis:
3228

33-
Module pipelines contains high-level methods that build pipelines for model training and prediction, preprocessing, etc.
29+
* how to detect specific features of ECG like R-peaks, P-wave, T-wave, etc;
30+
* how to recognize heart diseases from ECG, for example, atrial fibrillation.
3431

32+
``pipelines`` module contains predefined workflows to
33+
34+
* train a model to detect PQ, QT, QRS segments
35+
* calculate heart rate
36+
* train a model to find probabilities of heart diseases, in particular, atrial fibrillation.
37+
38+
Under the hood these methods contain actions that load signals, filter it and do complex calculations.
3539

3640
Contents
3741
========
@@ -46,9 +50,7 @@ Contents
4650
Basic usage
4751
===========
4852

49-
Here is an example of pipeline that loads ECG signals, makes some preprocessing and learns model over 50 epochs:
50-
51-
.. code-block :: python
53+
Here is an example of pipeline that loads ECG signals, makes preprocessing and train a model over 50 epochs::
5254

5355
train_pipeline = (
5456
dataset.train
@@ -69,7 +71,6 @@ Here is an example of pipeline that loads ECG signals, makes some preprocessing
6971
.run(batch_size=100, shuffle=True, drop_last=True, n_epochs=50)
7072
)
7173

72-
As a result of this pipeline one obtains a trained model.
7374

7475
Installation
7576
============
@@ -94,6 +95,9 @@ After that just import `cardio`::
9495

9596
.. note:: When cloning repo from GitHub use flag ``--recursive`` to make sure that ``Dataset`` submodule is also cloned.
9697

98+
git clone --recursive https://github.com/analysiscenter/cardio.git
99+
100+
97101
Citing CardIO
98102
==============
99103
Please cite CardIO in your publications if it helps your research.::

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
numba
2+
blosc
13
dill
24
wfdb
35
pytest

0 commit comments

Comments
 (0)