Ecgmentations
Ecgmentations is a Python library for ecg augmentation. Ecg augmentation is used in deep learning to increase the quality of trained models. The purpose of ecg augmentation is to create new training samples from the existing data.
Here is an example of how you can apply some augmentations from Ecgmentations to create new ecgs from the original one:
Table of contents
Authors
Rostislav Epifanov — Researcher in Novosibirsk
Installation
Installation from PyPI:
pip install ecgmentations
Installation from GitHub:
pip install git+https://github.com/rostepifanov/ecgmentations
A simple example
import numpy as np
import ecgmentations as E
# Declare an augmentation pipeline
transform = E.Sequential([
E.TimeReverse(p=0.5),
E.ChannelShuffle(p=0.06),
])
# Create example ecg (length, nchannels)
ecg = np.ones((5000, 12))
# Augment an ecg
transformed = transform(ecg=ecg)
transformed_ecg = transformed['ecg']
List of augmentations
The list of time axis transforms:
- TimeReverse
- TimeShift
- TimeSegmentShuffle
- RandomTimeWrap
- TimeCutout
- TimeCrop
- CenterTimeCrop
- RandomTimeCrop
- TimePadIfNeeded
- Pooling
- Blur
The list of pulse transforms:
The list of filter transforms:
The list of other transforms:
Citing
If you find this library useful for your research, please consider citing:
@misc{epifanov2023ecgmentations,
Author = {Rostislav Epifanov},
Title = {Ecgmentations},
Year = {2023},
Publisher = {GitHub},
Journal = {GitHub repository},
Howpublished = {\url{https://github.com/rostepifanov/ecgmentations}}
}
Metadata
Release files for ecgmentations 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecgmentations-0.0.9-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for ecgmentations-0.0.9-py2.py3-none-any.whl |
Release files / ecgmentations-0.0.9-py2.py3-none-any.whl
| Download URL | ecgmentations-0.0.9-py2.py3-none-any.whl |
|---|---|
| Size | 44.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6df3676068ce645b27fb91f6ab2ebba39ec9856b8318340611618d540b58a898
|
|
BLAKE2b-256 checksum How to use checksums |
99ffac63ddccae39552632ce44f62d990c1f55d9f083a4c4637e77411280fd0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.0
|
Security for ecgmentations 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.