Skip to main content

A package for sleep stage classification using ECG data

Project description

Python PyPI conda-forge Docs License

SleepECG

SleepECG provides tools for sleep stage classification when EEG signals are not available. Based only on ECG (and to a lesser extent also movement data), SleepECG provides functions for

  • downloading and reading open polysomnography datasets,
  • detecting heartbeats from ECG signals, and
  • classifying sleep stages (which includes preprocessing, feature extraction, and classification).

Documentation

Documentation for SleepECG is available on Read the Docs.

Changelog

Check out the changelog to learn what we added, changed, or fixed.

Dependencies

SleepECG requires Python ≥ 3.8 and the following packages:

Optional dependencies provide additional features:

  • joblib ≥ 1.0.0 (parallelized feature extraction)
  • matplotlib ≥ 3.5.0 (plot ECG time courses, hypnograms, and confusion matrices)
  • mne ≥ 1.0.0 (read data from MESA and SHHS)
  • numba ≥ 0.55.0 (JIT-compiled heartbeat detector)
  • tensorflow ≥ 2.7.0 (sleep stage classification with Keras models)
  • wfdb ≥ 3.4.0 (read data from SLPDB, MITDB, and LTDB)

Installation

SleepECG is available on PyPI and can be installed with pip:

pip install sleepecg

Alternatively, an unofficial conda package is available:

conda install -c conda-forge sleepecg

SleepECG with all optional dependencies can be installed with the following command:

pip install sleepecg[full]

If you want the latest development version, use the following command:

pip install git+https://github.com/cbrnr/sleepecg

Contributing

The contributing guide contains detailed instructions on how to contribute to SleepECG.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sleepecg-0.5.4.tar.gz (2.3 MB view hashes)

Uploaded Source

Built Distributions

sleepecg-0.5.4-cp311-cp311-win_amd64.whl (2.3 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

sleepecg-0.5.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.4-cp311-cp311-macosx_11_0_arm64.whl (2.3 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

sleepecg-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

sleepecg-0.5.4-cp310-cp310-win_amd64.whl (2.3 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

sleepecg-0.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.4-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

sleepecg-0.5.4-cp310-cp310-macosx_10_9_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

sleepecg-0.5.4-cp39-cp39-win_amd64.whl (2.3 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

sleepecg-0.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.4-cp39-cp39-macosx_11_0_arm64.whl (2.3 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

sleepecg-0.5.4-cp39-cp39-macosx_10_9_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

sleepecg-0.5.4-cp38-cp38-win_amd64.whl (2.3 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

sleepecg-0.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.4-cp38-cp38-macosx_11_0_arm64.whl (2.3 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

sleepecg-0.5.4-cp38-cp38-macosx_10_9_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page