- Ex. 1 - Sample Entropy
- Ex. 2 - [Fine-Grained] Permutation Entropy
- Ex. 3 - Phase Entropy
- Ex. 4 - Cross-Distribution Entropy
- Ex. 5 - Multiscale Entropy Object
- Ex. 6 - Multiscale [Increment] Entropy
- Ex. 7 - Refined Multisclae [Sample] Entropy
- Ex. 8 - Composite Multiscale Cross-[Approximate] Entropy
- Ex. 9 - Hierarchical Multiscale corrected Cross-[Conditional] Entropy
- Ex. 10 - Bidimensional Fuzzy Entropy
For concision, function commands written in the following example sections assume that the EntropyHub module has already been imported as EH.
import EntropyHub as EH EH.SampEn(...)
The following sections provide some basic examples of EntropyHub functions. These examples are merely a snippet of the full range of EntropyHub functionality.
In the following examples, signals / data are imported into Python using the
To use this function as outlined in the examples below, an internet connection is required.
EntropyHub.ExampleData() accepts any of the following strings:
vector of uniformly distributed random numbers in range [0 1]
vector of normally distributed random numbers with mean = 0; SD = 1
vector of uniformly distributed pseudorandom integers in range [1 8]
vector of chirp signal with the following parameters, f0 = :01; t1 = 4000; f1 = :025
3-column matrix: X, Y, Z components of the Lorenz system, (alpha = 10; beta = 8/3; rho = 28); [Xo = 10; Yo = 20; Zo = 10]
2-column matrix: X, Y components of the Henon attractor (alpha = 1.4; beta = 0.3); [Xo = 0; Yo = 0]
2-column matrix: uniformly distributed random numbers in range [0 1]
2-column matrix: normally distributed random numbers with mean = 0; SD = 1
2-column matrix: uniformly distributed pseudorandom integers in range [1 8]
Matrix of uniformly distributed random numbers in range [0 1]
Matrix of normally distributed random numbers with mean = 0; SD = 1
Matrix of uniformly distributed pseudorandom integers in range [1 8]
Matrix of image of fractal generated from the mandelbrot set
Matrix of image of the entropyhub logo
THINGS TO REMEMBER
For cross-entropy and multiscale cross-entropy functions, the two time series signals are passed as a two-column or two-row matrix. At present, it is not possible to pass signals of different lengths separately.
Parameters of the base or cross- entropy methods are passed to multiscale and
multiscale cross- entropy functions using the multiscale entropy object given by
Base and cross- entropy methods are declared with
MSobject() using a string of the function name.
Each bidimensional entropy function (SampEn2D, FuzzEn2D, DistEn2D, DispEn2D) has
an important keyword argument -
Lock. Bidimensional entropy functions are
“locked” by default (
Lock == True) to only permit matrices with a maximum size of 128 x 128.
In hierarchical multiscale entropy (
hMSEn()) and hierarchical multiscale cross-
hXMSEn()) functions, the length of the time series signal(s) is halved at each scale.
hXMSEn() only use the first 2^N data points where 2^N <= the length of the original time series signal.
i.e. For a signal of 5000 points, only the first 4096 are used. For a signal of 1500 points, only the first 1024 are used.