A package for sleep stage classification using ECG data
Project description
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)
- pandas ≥ 1.4.0 (read data from GUDB)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for sleepecg-0.5.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac861df0fbdc2a2afa83b4107772b71a9ae824b0870a3ca047eb7c2c470ce0fc |
|
MD5 | 80d9e8702dcac6b665815a7dc899c332 |
|
BLAKE2b-256 | 8efb669347e480996b2153cb637e8024117f501b2a13231cd25e4a63a3bac170 |
Hashes for sleepecg-0.5.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88d222e4bf145eed16a6196d35edac3cde1d6bdf797d263dfe5a33263b26134f |
|
MD5 | 37d2af71063c05185b82a53f789c222f |
|
BLAKE2b-256 | 6a1af2de3d9e4d03e070ca194118b876a4db8a49695dec67c39cd6985c09e113 |
Hashes for sleepecg-0.5.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3eecdb78d93a2c3318328b1b9e5cbda459973273cec073c1db9795ea12dea19 |
|
MD5 | f6dbf4f0ade8b5fb3424834f5601e2a2 |
|
BLAKE2b-256 | f4033d95f146b787568d7cdc1746ca7dcf9e10e6cf65ecf5f0c6f83acfa9c511 |
Hashes for sleepecg-0.5.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffb4b7fa491f840c1a5d4f4c612a1ec1d902f39e83b4489247c707f5fc7c568a |
|
MD5 | 321d25630dac1fa81615fe7b97d0bbe0 |
|
BLAKE2b-256 | b99ca9cd4c0f83caa7b7400ee5211e2927e9f5bd336087b0757bd178221c9ca6 |
Hashes for sleepecg-0.5.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d899bf5706fdf6026664598047efb98d06aefe1dae4cf07cfa48263efc5379e4 |
|
MD5 | 29af974c278727d86258a2eb17d8bda6 |
|
BLAKE2b-256 | 98d4d2b6a544c4b42449d6b58f5940478d4ebae0abbe46099e4e34f921c0fb47 |
Hashes for sleepecg-0.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1da637029742bb707af51d7acd775b3cf12435937ca26cf96726d14df52441b |
|
MD5 | 745a56f32b62bd46e999d1e7e73a6422 |
|
BLAKE2b-256 | a88c904f53d97cbdaa42a0eaeeba0f87fc6d4b64a364bce3c1b71b97ee45496d |
Hashes for sleepecg-0.5.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73cb6eaeb9722d0dbdac3f8176e8826f8e9268eea346ca168a7247958d05c5d1 |
|
MD5 | 9c66b407c3a79dab02910297b5005d53 |
|
BLAKE2b-256 | dd2b92e7bd7cb7bdab97fc446b0239a4184ef01582782412df6715a9cf3bdea7 |
Hashes for sleepecg-0.5.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 079ea3550d28a8f7a09cee60a6c2bc640ecc539973c45bac178f979a3c283770 |
|
MD5 | a29ffbe6093d2e9845adc0e59d178b98 |
|
BLAKE2b-256 | 6311f1d1733bbb6b88a359b9f0751fdb9d1a3684a5e1e1ccafdc5a8727ac9c85 |
Hashes for sleepecg-0.5.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d52f8f58f8ab5b290c7c9a42316fc195aecb18e2312dc498c35ce448a3c693c |
|
MD5 | 9d0aa016af4541a06d4850a97feac4cb |
|
BLAKE2b-256 | 0379def6409717d1d61ccd27e08ce3ac2163ea603c2c027a3776fefba729fc6a |
Hashes for sleepecg-0.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e48ca57b9dff848669eb548692d5a563f5023dd62e2b324b9c61f78fd9d813e4 |
|
MD5 | c6f6359e3d7a9b0eb2cf074c9354a3e4 |
|
BLAKE2b-256 | 0f90dffaa1550ac249df300ff8a026c43740fcecdc52c08e54c2659b97e3f6b5 |
Hashes for sleepecg-0.5.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a73c80fec5ef7c92cb5b09b8350c17d43e757822b5c7644a2cc95d671c7d770 |
|
MD5 | 0906e9d3c148e9a142e170f81bda5288 |
|
BLAKE2b-256 | 746a548ecdee489417a71eabe6324290cdc5a6a918d4b93f0453497402f3da39 |
Hashes for sleepecg-0.5.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7feb0cd0eca0096f479b06d87d1120f90720f3f03209ff802b16622be9c0d15 |
|
MD5 | df1de6744b7e9ced98fd1c6a48303d09 |
|
BLAKE2b-256 | 248f0996f1048125d9bf7445f0d53e18ecaf26ba19e595bd66b4c62491dd86f1 |
Hashes for sleepecg-0.5.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 487b593ef72dfb47fee6ba8da1539952c84fe53922a7c6c9c30be0d96d877388 |
|
MD5 | 45d919eca56d22c312e8f6eb1742e857 |
|
BLAKE2b-256 | d25dfea4636d0f3ccdb3c691968bd9259039bdbf39fcee03636d1e0491e319cc |
Hashes for sleepecg-0.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff1d0e0572704f43a6461420ecdb64a4ac7f5b25e156a2e6b0f236dbdc931ba1 |
|
MD5 | 540349a42f96d7fc3007b7eb1eefe31f |
|
BLAKE2b-256 | ed9853ead65c13312157b62f4563183c5769dd03a171b0133fdfe67d4a47defc |
Hashes for sleepecg-0.5.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a2b5bf56118f584ef294c2e2eaa661d3f2da0876f436c6fbaa1a8225274c7e9 |
|
MD5 | 09c04144e58bbaef676e79353f6119a3 |
|
BLAKE2b-256 | cf5da7396664b72b7f8196ed29e4aabdd8d0868811ef35e07b840ba37727111c |
Hashes for sleepecg-0.5.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0615035f26e901bbff2b6f6d7692787ff6f54adce9cff0699544bb0eb7a87b18 |
|
MD5 | 232f51d37cb4397cd6ea7658510ac8f7 |
|
BLAKE2b-256 | 10cbd10f85454512490e4bea4cc6577c7066418e76e72d960f05d1170830d852 |