GPU-accelerated Sample Entropy in Python
Project description
GPU-Accelerated Sample Entropy in Python
This repository provides a fast, GPU-accelerated implementation of Sample Entropy (SampEn) for time series analysis using Python, Numba, and CUDA.
Sample Entropy is a widely-used statistical measure that quantifies the complexity or regularity of a time series. This implementation leverages GPU parallelism to efficiently compute SampEn for large datasets. It has been benchmarked as 100x faster than CPU-based implementations.
Features
- Efficient GPU-based kernel using Numba CUDA
- Chebyshev distance for sequence similarity
- Dynamic chunk processing to handle large time series
- Graceful handling of edge cases (zero matches, infinite entropy)
Requirements
- Python 3.8+
- NumPy
- Numba
- CUDA-enabled GPU and NVIDIA drivers
Installation
Install from PyPI
pip install sampen-gpu
Install from source
git clone https://github.com/4d30/sampen.git
cd sampen
pip install -e .
Usage
from sampen import sampen
import numpy as np
data = np.random.rand(10000) # your time series data
m = 2 # template length
r = 0.2 # similarity threshold
entropy = sampen(data, m, r)
print("Sample Entropy:", entropy)
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sampen_gpu-0.1.1.tar.gz.
File metadata
- Download URL: sampen_gpu-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a4083c28de81fc494785b0343e396e5138640790a13f6e789d01b950226417f
|
|
| MD5 |
85c08c28c1dc4e5744210085cf4a9dc1
|
|
| BLAKE2b-256 |
a6ba33af7c08c7a6636b585a89949bec47ac144a0cb7b9c82cb31c761904e4d9
|
File details
Details for the file sampen_gpu-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sampen_gpu-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b113352490da2e0cedc3a4810d9d4e7743e06c76e6247651cdbcf0f58f0f179
|
|
| MD5 |
caab3b0f4cc5b2fd1adb5b9d0077c50c
|
|
| BLAKE2b-256 |
9e67f65c76e8678a618dc2a356950d5171b9a261cd2d0da6cc813e6caa13bb85
|