Skip to content

A Python library for ecg data augmentation. Useful for machine learning.

License

Notifications You must be signed in to change notification settings

rostepifanov/ecgmentations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecgmentations

Python version support PyPI version Downloads

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:

preview

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((12, 5000)).T

# Augment an ecg
transformed = transform(ecg=ecg)
transformed_ecg = transformed['ecg']

List of augmentations

The list of time axis transforms:

The list of pulse 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}}
}

About

A Python library for ecg data augmentation. Useful for machine learning.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages