diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json
index 400ac0d..69b30c7 100644
--- a/dev/.documenter-siteinfo.json
+++ b/dev/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.8.5","generation_timestamp":"2024-03-26T00:01:00","documenter_version":"1.3.0"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.8.5","generation_timestamp":"2024-03-29T22:11:26","documenter_version":"1.3.0"}}
\ No newline at end of file
diff --git a/dev/Examples/Example1/index.html b/dev/Examples/Example1/index.html
index 4017065..e1d86ec 100644
--- a/dev/Examples/Example1/index.html
+++ b/dev/Examples/Example1/index.html
@@ -1,5 +1,5 @@
-
Import a signal of normally distributed random numbers [mean = 0; SD = 1], and calculate the sample entropy for each embedding dimension (m) from 0 to 4.
X = ExampleData("gaussian");
+Ex.1: Sample Entropy · EntropyHub.jl
Import a signal of normally distributed random numbers [mean = 0; SD = 1], and calculate the sample entropy for each embedding dimension (m) from 0 to 4.
X = ExampleData("gaussian");
Samp, _ = SampEn(X, m = 4);
Import a signal of uniformly distributed random numbers in the range [-1, 1] and calculate the sample entropy for an embedding dimension (m) of 5, a time delay of 2, and a threshold radius of 0.075. Return the conditional probability (Vcp) and the number of overlapping matching vector pairs of lengths m+1 (Ka) and m (Kb), respectively.
Samp, _, _, Vcp_Ka_Kb = SampEn(X, m = 5, tau = 2, r = 0.075, Vcp = true)
Vcp, Ka, Kb = Vcp_Ka_Kb
Vcp = 0.00018629728228987074
Ka = 92
-Kb = 3943
Settings
This document was generated with Documenter.jl version 1.3.0 on Tuesday 26 March 2024. Using Julia version 1.8.5.
+Kb = 3943
Settings
This document was generated with Documenter.jl version 1.3.0 on Friday 29 March 2024. Using Julia version 1.8.5.
Import an image of a Mandelbrot fractal as a matrix.
X = ExampleData("mandelbrot_Mat");
using Plots
-heatmap(X, background_color="black")
Calculate the bidimensional fuzzy entropy in trits (logarithm base 3) with a template matrix of size [8 x 5], and a time delay (tau) of 2 using a 'constgaussian' fuzzy membership function (r=24).
FE2D = FuzzEn2D(X, m = (8, 5), tau = 2, Fx = "constgaussian", r = 24, Logx = 3)
1.4885540777860427
Settings
This document was generated with Documenter.jl version 1.3.0 on Tuesday 26 March 2024. Using Julia version 1.8.5.
+heatmap(X, background_color="black")
Calculate the bidimensional fuzzy entropy in trits (logarithm base 3) with a template matrix of size [8 x 5], and a time delay (tau) of 2 using a 'constgaussian' fuzzy membership function (r=24).
FE2D = FuzzEn2D(X, m = (8, 5), tau = 2, Fx = "constgaussian", r = 24, Logx = 3)
1.4885540777860427
Settings
This document was generated with Documenter.jl version 1.3.0 on Friday 29 March 2024. Using Julia version 1.8.5.
Calculate fine-grained permutation entropy of the z component in dits (logarithm base 10) with an embedding dimension of 3, time delay of 2, an alpha parameter of 1.234. Return Pnorm normalised w.r.t the number of all possible permutations (m!) and the condition permutation entropy (cPE) estimate.
Z = Data[:,3];
Perm, Pnorm, cPE = PermEn(Z, m = 3, tau = 2, Typex = "finegrain",
- tpx = 1.234, Logx = 10, Norm = false)
Calculate the phase entropy of the y-component in bits (logarithm base 2) without normalization using 7 angular partitions and return the second-order difference plot.
Y = Data[:,2];
Phas = PhasEn(Y, K = 7, Norm = false, Logx = 2, Plotx = true)
2.0192821496913216
Calculate the phase entropy of the x-component using 11 angular partitions, a time delay of 2, and return the second-order difference plot.
X = Data[:,1];
-Phas = PhasEn(X, K = 11, tau = 2, Plotx = true)
0.8395391613164361
Settings
This document was generated with Documenter.jl version 1.3.0 on Tuesday 26 March 2024. Using Julia version 1.8.5.
+Phas = PhasEn(X, K = 11, tau = 2, Plotx = true)
0.8395391613164361
Settings
This document was generated with Documenter.jl version 1.3.0 on Friday 29 March 2024. Using Julia version 1.8.5.
Import a signal of pseudorandom integers in the range [1, 8] and calculate the cross- distribution entropy with an embedding dimension of 5, a time delay (tau) of 3, and 'Sturges' bin selection method.
X = ExampleData("randintegers2");
+Ex.4: Cross-Distribution Entropy · EntropyHub.jl
Import a signal of pseudorandom integers in the range [1, 8] and calculate the cross- distribution entropy with an embedding dimension of 5, a time delay (tau) of 3, and 'Sturges' bin selection method.
X = ExampleData("randintegers2");
XDist, _ = XDistEn(X[:,1], X[:,2], m = 5, tau = 3);
Note: 17/25 bins were empty
XDist = 0.5248413652396312
Use Rice's method to determine the number of histogram bins and return the probability of each bin (Ppi).
XDist, Ppi = XDistEn(X[:,1], X[:,2], m = 5, tau = 3, Bins = "rice")
The base and cross- entropy functions used in the multiscale entropy calculation are declared by passing EntropyHub functions to MSobject(), not string names.
Create a multiscale entropy object (Mobj) for multiscale fuzzy entropy, calculated with an embedding dimension of 5, a time delay (tau) of 2, using a sigmoidal fuzzy function with the r scaling parameters (3, 1.2).
Mobj = MSobject(FuzzEn, m = 5, tau = 2, Fx = "sigmoid", r = (3, 1.2))
(Func = EntropyHub._FuzzEn.FuzzEn, m = 5, tau = 2, Fx = "sigmoid", r = (3, 1.2))
Create a multiscale entropy object (Mobj) for multiscale corrected-cross-conditional entropy, calculated with an embedding dimension of 6 and using a 11-symbolic data transform.
Mobj = MSobject(XCondEn, m = 6, c = 11)
(Func = EntropyHub._XCondEn.XCondEn, m = 6, c = 11)
Settings
This document was generated with Documenter.jl version 1.3.0 on Tuesday 26 March 2024. Using Julia version 1.8.5.
The base and cross- entropy functions used in the multiscale entropy calculation are declared by passing EntropyHub functions to MSobject(), not string names.
Create a multiscale entropy object (Mobj) for multiscale fuzzy entropy, calculated with an embedding dimension of 5, a time delay (tau) of 2, using a sigmoidal fuzzy function with the r scaling parameters (3, 1.2).
Mobj = MSobject(FuzzEn, m = 5, tau = 2, Fx = "sigmoid", r = (3, 1.2))
(Func = EntropyHub._FuzzEn.FuzzEn, m = 5, tau = 2, Fx = "sigmoid", r = (3, 1.2))
Create a multiscale entropy object (Mobj) for multiscale corrected-cross-conditional entropy, calculated with an embedding dimension of 6 and using a 11-symbolic data transform.
Mobj = MSobject(XCondEn, m = 6, c = 11)
(Func = EntropyHub._XCondEn.XCondEn, m = 6, c = 11)
Settings
This document was generated with Documenter.jl version 1.3.0 on Friday 29 March 2024. Using Julia version 1.8.5.
Import a signal of uniformly distributed pseudorandom integers in the range [1 8] and create a multiscale entropy object with the following parameters: EnType = IncrEn(), embedding dimension = 3, a quantifying resolution = 6, normalization = true.
X = ExampleData("randintegers");
+Ex.6: Multiscale [Increment] Entropy · EntropyHub.jl
Import a signal of uniformly distributed pseudorandom integers in the range [1 8] and create a multiscale entropy object with the following parameters: EnType = IncrEn(), embedding dimension = 3, a quantifying resolution = 6, normalization = true.
X = ExampleData("randintegers");
Mobj = MSobject(IncrEn, m = 3, R = 6, Norm = true)
(Func = EntropyHub._IncrEn.IncrEn, m = 3, R = 6, Norm = true)
Calculate the multiscale increment entropy over 5 temporal scales using the modified graining procedure where:
Import a signal of uniformly distributed pseudorandom integers in the range [1, 8] and create a multiscale entropy object with the following parameters: EnType = SampEn(), embedding dimension = 4, radius threshold = 1.25
X = ExampleData("randintegers");
-Mobj = MSobject(SampEn, m = 4, r = 1.25)
(Func = EntropyHub._SampEn.SampEn, m = 4, r = 1.25)
Calculate the refined multiscale sample entropy and the complexity index (Ci) over 5 temporal scales using a 3rd order Butterworth filter with a normalised corner frequency of at each temporal scale (τ), where the radius threshold value (r) specified by Mobj becomes scaled by the median absolute deviation of the filtered signal at each scale.
Import a signal of uniformly distributed pseudorandom integers in the range [1, 8] and create a multiscale entropy object with the following parameters: EnType = SampEn(), embedding dimension = 4, radius threshold = 1.25
X = ExampleData("randintegers");
+Mobj = MSobject(SampEn, m = 4, r = 1.25)
(Func = EntropyHub._SampEn.SampEn, m = 4, r = 1.25)
Calculate the refined multiscale sample entropy and the complexity index (Ci) over 5 temporal scales using a 3rd order Butterworth filter with a normalised corner frequency of at each temporal scale (τ), where the radius threshold value (r) specified by Mobj becomes scaled by the median absolute deviation of the filtered signal at each scale.
Import two signals of uniformly distributed pseudorandom integers in the range [1 8] and create a multiscale entropy object with the following parameters: EnType = XApEn(), embedding dimension = 2, time delay = 2, radius distance threshold = 0.5
X = ExampleData("randintegers2");
+Ex.8: Composite Multiscale Cross-Approximate Entropy · EntropyHub.jl
Import two signals of uniformly distributed pseudorandom integers in the range [1 8] and create a multiscale entropy object with the following parameters: EnType = XApEn(), embedding dimension = 2, time delay = 2, radius distance threshold = 0.5
X = ExampleData("randintegers2");
Mobj = MSobject(XApEn, m = 2, tau = 2, r = 0.5)
(Func = EntropyHub._XApEn.XApEn, m = 2, tau = 2, r = 0.5)
Calculate the comsposite multiscale cross-approximate entropy over 3 temporal scales where the radius distance threshold value (r) specified by Mobj becomes scaled by the variance of the signal at each scale.
Import the x and y components of the Henon system of equations and create a multiscale entropy object with the following parameters: EnType = XCondEn(), embedding dimension = 2, time delay = 2, number of symbols = 12, logarithm base = 2, normalization = true
Import the x and y components of the Henon system of equations and create a multiscale entropy object with the following parameters: EnType = XCondEn(), embedding dimension = 2, time delay = 2, number of symbols = 12, logarithm base = 2, normalization = true
Data = ExampleData("henon");
Mobj = MSobject(XCondEn, m = 2, tau = 2, c = 12, Logx = 2, Norm = true)
using Plots
scatter(Data[:,1], Data[:,2], markercolor = "green", markerstrokecolor = "black",
-markersize = 3, background_color = "black", grid = false)
Calculate the hierarchical multiscale corrected cross-conditional entropy over 4 temporal scales and return the average cross-entropy at each scale (Sn), the complexity index (Ci), and a plot of the multiscale entropy curve and the hierarchical tree with the cross-entropy value at each node.
Calculate the hierarchical multiscale corrected cross-conditional entropy over 4 temporal scales and return the average cross-entropy at each scale (Sn), the complexity index (Ci), and a plot of the multiscale entropy curve and the hierarchical tree with the cross-entropy value at each node.
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 Julia using the ExampleData() function. To use this function as shown in the examples below, an internet connection is required.
Imports sample data time series with specific properties that are commonly used as benchmarks for assessing the performance of various entropy methods. The datasets returned by ExampleData() are used in the examples provided in documentation on www.EntropyHub.xyz and elsewhere. ***Note*** ExampleData() requires an internet connection to download and import the required datasets!
Datais the sample dataset imported corresponding to the string input SigName which can be one of the following string:
Arguments:
SigName -
`uniform` - uniformly distributed random number sequence in range [0 1], N = 5000
+Notes on Examples · EntropyHub.jl
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 Julia using the ExampleData() function. To use this function as shown in the examples below, an internet connection is required.
Imports sample data time series with specific properties that are commonly used as benchmarks for assessing the performance of various entropy methods. The datasets returned by ExampleData() are used in the examples provided in documentation on www.EntropyHub.xyz and elsewhere. ***Note*** ExampleData() requires an internet connection to download and import the required datasets!
Datais the sample dataset imported corresponding to the string input SigName which can be one of the following string:
Arguments:
SigName -
`uniform` - uniformly distributed random number sequence in range [0 1], N = 5000
`randintegers` - randomly distributed integer sequence in range [1 8], N = 4096
`gaussian` - normally distributed number sequence [mean: 0, SD: 1], N = 5000
`henon` - X and Y components of the Henon attractor [alpha: 1.4, beta: .3, Xo = 0, Yo = 0], N = 4500
@@ -14,4 +14,4 @@
`mandelbrot_Mat` - matrix representing a Mandelbrot fractal image with values in range [0 255], N = 92 x 115
`entropyhub_Mat` - matrix representing the EntropyHub logo with values in range [0 255], N = 127 x 95
-For further info on these graining procedures see the `EntropyHub guide <https://github.com/MattWillFlood/EntropyHub/blob/main/EntropyHub%20Guide.pdf>`_.
Parameters of the base or cross- entropy methods are passed to multiscale and multiscale cross- functions using the multiscale entropy object using MSobject. Base and cross- entropy methods are declared with MSobject() using any Base or Cross- entropy function. See the MSobject example in the following sections for more info.
In hierarchical multiscale entropy (hMSEn) and hierarchical multiscale cross-entropy (hXMSEn) functions, the length of the time series signal(s) is halved at each scale. Thus, hMSEn and 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.
BIDIMENSIONAL ENTROPIES
Each bidimensional entropy function (SampEn2D, FuzzEn2D, DistEn2D) 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.
Settings
This document was generated with Documenter.jl version 1.3.0 on Tuesday 26 March 2024. Using Julia version 1.8.5.
+For further info on these graining procedures see the `EntropyHub guide <https://github.com/MattWillFlood/EntropyHub/blob/main/EntropyHub%20Guide.pdf>`_.
Parameters of the base or cross- entropy methods are passed to multiscale and multiscale cross- functions using the multiscale entropy object using MSobject. Base and cross- entropy methods are declared with MSobject() using any Base or Cross- entropy function. See the MSobject example in the following sections for more info.
In hierarchical multiscale entropy (hMSEn) and hierarchical multiscale cross-entropy (hXMSEn) functions, the length of the time series signal(s) is halved at each scale. Thus, hMSEn and 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.
BIDIMENSIONAL ENTROPIES
Each bidimensional entropy function (SampEn2D, FuzzEn2D, DistEn2D) 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.
Settings
This document was generated with Documenter.jl version 1.3.0 on Friday 29 March 2024. Using Julia version 1.8.5.
Returns the approximate entropy estimates Ap and the log-average number of matched vectors Phi for m = [0,1,2], estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, radius distance threshold = 0.2*SD(Sig), logarithm = natural
Ap, Phi = ApEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Real=0.2*std(Sig,corrected=false), Logx::Real=exp(1))
Returns the approximate entropy estimates Ap of the data sequence Sig for dimensions = [0,1,...,m] using the specified keyword arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
r - Radius Distance Threshold, a positive scalar
Logx - Logarithm base, a positive scalar
See also XApEn, SampEn, MSEn, FuzzEn, PermEn, CondEn, DispEn
References:
[1] Steven M. Pincus,
"Approximate entropy as a measure of system complexity."
Proceedings of the National Academy of Sciences
- 88.6 (1991): 2297-2301.
Returns the sample entropy estimates Samp and the number of matched state vectors (m:B, m+1:A) for m = [0,1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, radius threshold = 0.2*SD(Sig), logarithm = natural
Samp, A, B, (Vcp, Ka, Kb) = SampEn(Sig, ..., Vcp = true)
If Vcp == true, an additional tuple (Vcp, Ka, Kb) is returned with the sample entropy estimates (Samp) and the number of matched state vectors (m: B, m+1: A). (Vcp, Ka, Kb) contains the variance of the conditional probabilities (Vcp), i.e. CP = A/B, and the number of overlapping matching vector pairs of lengths m+1 (Ka) and m (Kb), respectively. Note Vcp is undefined for the zeroth embedding dimension (m = 0) and due to the computational demand, will take substantially more time to return function outputs. See Appendix B in [2] for more info.
Samp, A, B = SampEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Real=0.2*std(Sig,corrected=false), Logx::Real=exp(1), Vcp::Bool=false)
Returns the sample entropy estimates Samp for dimensions = [0,1,...,m] estimated from the data sequence Sig using the specified keyword arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
r - Radius Distance Threshold, a positive scalar
Logx - Logarithm base, a positive scalar
See also ApEn, FuzzEn, PermEn, CondEn, XSampEn, SampEn2D, MSEn
References:
[1] Joshua S Richman and J. Randall Moorman.
+ 88.6 (1991): 2297-2301.
Returns the sample entropy estimates Samp and the number of matched state vectors (m:B, m+1:A) for m = [0,1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, radius threshold = 0.2*SD(Sig), logarithm = natural
Samp, A, B, (Vcp, Ka, Kb) = SampEn(Sig, ..., Vcp = true)
If Vcp == true, an additional tuple (Vcp, Ka, Kb) is returned with the sample entropy estimates (Samp) and the number of matched state vectors (m: B, m+1: A). (Vcp, Ka, Kb) contains the variance of the conditional probabilities (Vcp), i.e. CP = A/B, and the number of overlapping matching vector pairs of lengths m+1 (Ka) and m (Kb), respectively. Note Vcp is undefined for the zeroth embedding dimension (m = 0) and due to the computational demand, will take substantially more time to return function outputs. See Appendix B in [2] for more info.
Samp, A, B = SampEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Real=0.2*std(Sig,corrected=false), Logx::Real=exp(1), Vcp::Bool=false)
Returns the sample entropy estimates Samp for dimensions = [0,1,...,m] estimated from the data sequence Sig using the specified keyword arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
r - Radius Distance Threshold, a positive scalar
Logx - Logarithm base, a positive scalar
Vcp - Option to return the variance of the conditional probabilities and the number of overlapping matching vector pairs of lengths
See also ApEn, FuzzEn, PermEn, CondEn, XSampEn, SampEn2D, MSEn
References:
[1] Joshua S Richman and J. Randall Moorman.
"Physiological time-series analysis using approximate entropy
and sample entropy."
American Journal of Physiology-Heart and Circulatory Physiology (2000).
@@ -18,7 +18,7 @@
[2] Douglas E Lake, Joshua S Richman, M.P. Griffin, J. Randall Moorman
"Sample entropy analysis of neonatal heart rate variability."
American Journal of Physiology-Regulatory, Integrative and Comparative Physiology
- 283, no. 3 (2002): R789-R797.
Returns the fuzzy entropy estimates Fuzz and the average fuzzy distances (m:Ps1, m+1:Ps2) for m = [1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, fuzzy function (Fx) = "default", fuzzy function parameters (r) = [0.2, 2], logarithm = natural
Returns the fuzzy entropy estimates Fuzz for dimensions = [1,...,m] estimated for the data sequence Sig using the specified keyword arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
Fx - Fuzzy function name, one of the following: {"sigmoid", "modsampen", "default", "gudermannian","bell", "triangular", "trapezoidal1", "trapezoidal2","z_shaped", "gaussian", "constgaussian"}
r - Fuzzy function parameters, a 1 element scalar or a 2 element tuple of positive values. The r parameters for each fuzzy function are defined as follows: [default: [.2 2]]
default: r(1) = divisor of the exponential argument
+ 283, no. 3 (2002): R789-R797.
Returns the fuzzy entropy estimates Fuzz and the average fuzzy distances (m:Ps1, m+1:Ps2) for m = [1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, fuzzy function (Fx) = "default", fuzzy function parameters (r) = [0.2, 2], logarithm = natural
Returns the fuzzy entropy estimates Fuzz for dimensions = [1,...,m] estimated for the data sequence Sig using the specified keyword arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
Fx - Fuzzy function name, one of the following: {"sigmoid", "modsampen", "default", "gudermannian","bell", "triangular", "trapezoidal1", "trapezoidal2","z_shaped", "gaussian", "constgaussian"}
r - Fuzzy function parameters, a 1 element scalar or a 2 element tuple of positive values. The r parameters for each fuzzy function are defined as follows: [default: [.2 2]]
default: r(1) = divisor of the exponential argument
r(2) = argument exponent (pre-division)
sigmoid: r(1) = divisor of the exponential argument
r(2) = value subtracted from argument (pre-division)
@@ -55,14 +55,14 @@
"Fuzzy Entropy Metrics for the Analysis of Biomedical Signals:
Assessment and Comparison"
IEEE Access
- 7 (2019): 104833-104847
Returns the Kolmogorov entropy estimates K2 and the correlation integrals Ci for m = [1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, r = 0.2*SD(Sig), logarithm = natural
K2, Ci = K2En(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Real=0.2*std(Sig,corrected=false), Logx::Real=exp(1))
Returns the Kolmogorov entropy estimates K2 for dimensions = [1,...,m] estimated from the data sequence Sig using the 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
r - Radius, a positive scalar
Logx - Logarithm base, a positive scalar
See also DistEn, XK2En, MSEn
References:
[1] Peter Grassberger and Itamar Procaccia,
+ 7 (2019): 104833-104847
Returns the Kolmogorov entropy estimates K2 and the correlation integrals Ci for m = [1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, r = 0.2*SD(Sig), logarithm = natural
K2, Ci = K2En(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Real=0.2*std(Sig,corrected=false), Logx::Real=exp(1))
Returns the Kolmogorov entropy estimates K2 for dimensions = [1,...,m] estimated from the data sequence Sig using the 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
r - Radius, a positive scalar
Logx - Logarithm base, a positive scalar
See also DistEn, XK2En, MSEn
References:
[1] Peter Grassberger and Itamar Procaccia,
"Estimation of the Kolmogorov entropy from a chaotic signal."
Physical review A 28.4 (1983): 2591.
[2] Lin Gao, Jue Wang and Longwei Chen
"Event-related desynchronization and synchronization
quantification in motor-related EEG by Kolmogorov entropy"
- J Neural Eng. 2013 Jun;10(3):03602
Returns the permuation entropy estimates Perm, the normalised permutation entropy Pnorm and the conditional permutation entropy cPE for m = [1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, logarithm = base 2, normalisation = w.r.t #symbols (m-1) Note: using the standard PermEn estimation, Perm = 0 when m = 1. Note: It is recommeneded that signal length > 5m! (see [8] and Amigo et al., Europhys. Lett. 83:60005, 2008)
Perm, Pnorm, cPE = PermEn(Sig, m)
Returns the permutation entropy estimates Perm estimated from the data sequence Sig using the specified embedding dimensions = [1,...,m] with other default parameters as listed above.
Returns the permutation entropy estimates Perm for dimensions = [1,...,m] estimated from the data sequence Sig using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
tau - Time Delay, a positive integer
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
Returns the permuation entropy estimates Perm, the normalised permutation entropy Pnorm and the conditional permutation entropy cPE for m = [1,2] estimated from the data sequence Sig using the default parameters: embedding dimension = 2, time delay = 1, logarithm = base 2, normalisation = w.r.t #symbols (m-1) Note: using the standard PermEn estimation, Perm = 0 when m = 1. Note: It is recommeneded that signal length > 5m! (see [8] and Amigo et al., Europhys. Lett. 83:60005, 2008)
Perm, Pnorm, cPE = PermEn(Sig, m)
Returns the permutation entropy estimates Perm estimated from the data sequence Sig using the specified embedding dimensions = [1,...,m] with other default parameters as listed above.
Returns the permutation entropy estimates Perm for dimensions = [1,...,m] estimated from the data sequence Sig using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
tau - Time Delay, a positive integer
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
Norm - Normalisation of PermEn value:
false - normalises w.r.t log(# of permutation symbols [m-1]) - default
true - normalises w.r.t log(# of all possible permutations [m!])
* Note: Normalised permutation entropy is undefined for m = 1.
** Note: When Typex = 'uniquant' and Norm = true, normalisation
@@ -120,19 +120,19 @@
"Phase permutation entropy: A complexity measure for nonlinear time
series incorporating phase information."
Physica A: Statistical Mechanics and its Applications
- 568 (2021): 125686.
Returns the corrected conditional entropy estimates (Cond) and the corresponding Shannon entropies (m: SEw, m+1: SEz) for m = [1,2] estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, symbols = 6, logarithm = natural, normalisation = false Note: CondEn(m=1) returns the Shannon entropy of Sig.
Returns the corrected conditional entropy estimates (Cond) and the corresponding Shannon entropies (m: SEw, m+1: SEz) for m = [1,2] estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, symbols = 6, logarithm = natural, normalisation = false Note: CondEn(m=1) returns the Shannon entropy of Sig.
Returns the corrected conditional entropy estimates (Cond) from the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
tau - Time Delay, a positive integer
c - # of symbols, an integer > 1
Logx - Logarithm base, a positive scalar
Norm - Normalisation of CondEn value:
[false] no normalisation - default
[true] normalises w.r.t Shannon entropy of data sequence `Sig`
See also XCondEn, MSEn, PermEn, DistEn, XPermEn
References:
[1] Alberto Porta, et al.,
"Measuring regularity by means of a corrected conditional
entropy in sympathetic outflow."
Biological cybernetics
- 78.1 (1998): 71-78.
Returns the distribution entropy estimate (Dist) and the corresponding distribution probabilities (Ppi) estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, binning method = 'Sturges', logarithm = base 2, normalisation = w.r.t # of histogram bins
Dist, Ppi = DistEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, Bins::Union{Int,String}="Sturges", Logx::Real=2, Norm::Bool=true)
Returns the distribution entropy estimate (Dist) estimated from the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
Bins - Histogram bin selection method for distance distribution, one of the following:
an integer > 1 indicating the number of bins, or one of the
+ 78.1 (1998): 71-78.
Returns the distribution entropy estimate (Dist) and the corresponding distribution probabilities (Ppi) estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, binning method = 'Sturges', logarithm = base 2, normalisation = w.r.t # of histogram bins
Dist, Ppi = DistEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, Bins::Union{Int,String}="Sturges", Logx::Real=2, Norm::Bool=true)
Returns the distribution entropy estimate (Dist) estimated from the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
Bins - Histogram bin selection method for distance distribution, one of the following:
an integer > 1 indicating the number of bins, or one of the
following strings {'sturges','sqrt','rice','doanes'}
[default: 'sturges']
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
Norm - Normalisation of DistEn value:
[false] no normalisation.
[true] normalises w.r.t # of histogram bins - default
See also XDistEn, DistEn2D, MSEn, K2En
References:
[1] Li, Peng, et al.,
"Assessing the complexity of short-term heartbeat interval
series by distribution entropy."
Medical & biological engineering & computing
- 53.1 (2015): 77-87.
Returns the spectral entropy estimate of the full spectrum (Spec) and the within-band entropy (BandEn) estimated from the data sequence (Sig) using the default parameters: N-point FFT = 2*len(Sig) + 1, normalised band edge frequencies = [0 1], logarithm = base 2, normalisation = w.r.t # of spectrum/band frequency values.
Returns the spectral entropy estimate of the full spectrum (Spec) and the within-band entropy (BandEn) estimated from the data sequence (Sig) using the default parameters: N-point FFT = 2*len(Sig) + 1, normalised band edge frequencies = [0 1], logarithm = base 2, normalisation = w.r.t # of spectrum/band frequency values.
Returns the spectral entropy (Spec) and the within-band entropy (BandEn) estimate for the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
N - Resolution of spectrum (N-point FFT), an integer > 1
Freqs - Normalised band edge frequencies, a 2 element tuple with values
in range [0 1] where 1 corresponds to the Nyquist frequency (Fs/2).
Note: When no band frequencies are entered, BandEn == SpecEn
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
Norm - Normalisation of Spec value:
[false] no normalisation.
[true] normalises w.r.t # of spectrum/band frequency values - default.
For more info, see the EntropyHub guide.
See also XSpecEn, fft, MSEn, XMSEn
References:
[1] G.E. Powell and I.C. Percival,
"A spectral entropy method for distinguishing regular and
@@ -144,7 +144,7 @@
"Quantification of EEG irregularity by use of the entropy of
the power spectrum."
Electroencephalography and clinical neurophysiology
- 79.3 (1991): 204-210.
Returns the dispersion entropy (Dispx) and the reverse dispersion entropy (RDE) estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, symbols = 3, logarithm = natural, data transform = normalised cumulative density function (ncdf)
Returns the dispersion entropy (Dispx) and the reverse dispersion entropy (RDE) estimated from the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
c - Number of symbols, an integer > 1
Typex - Type of data-to-symbolic sequence transform, one of the following: {"linear", "kmeans" ,"ncdf", "finesort", "equal"}
See the EntropyHub guide for more info on these transforms.
Logx - Logarithm base, a positive scalar
Fluct - When Fluct == true, DispEn returns the fluctuation-based Dispersion entropy. [default: false]
Norm - Normalisation of Dispx and RDE value: [false] no normalisation - default [true] normalises w.r.t number of possible dispersion patterns (c^m or (2c -1)^m-1 if Fluct == true).
rho - If Typex == 'finesort', rho is the tuning parameter (default: 1)
See also PermEn, SyDyEn, MSEn
References:
[1] Mostafa Rostaghi and Hamed Azami,
+ 79.3 (1991): 204-210.
Returns the dispersion entropy (Dispx) and the reverse dispersion entropy (RDE) estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, symbols = 3, logarithm = natural, data transform = normalised cumulative density function (ncdf)
Returns the dispersion entropy (Dispx) and the reverse dispersion entropy (RDE) estimated from the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
c - Number of symbols, an integer > 1
Typex - Type of data-to-symbolic sequence transform, one of the following: {"linear", "kmeans" ,"ncdf", "finesort", "equal"}
See the EntropyHub guide for more info on these transforms.
Logx - Logarithm base, a positive scalar
Fluct - When Fluct == true, DispEn returns the fluctuation-based Dispersion entropy. [default: false]
Norm - Normalisation of Dispx and RDE value: [false] no normalisation - default [true] normalises w.r.t number of possible dispersion patterns (c^m or (2c -1)^m-1 if Fluct == true).
rho - If Typex == 'finesort', rho is the tuning parameter (default: 1)
See also PermEn, SyDyEn, MSEn
References:
[1] Mostafa Rostaghi and Hamed Azami,
"Dispersion entropy: A measure for time-series analysis."
IEEE Signal Processing Letters
23.5 (2016): 610-614.
@@ -164,7 +164,7 @@
"Fault diagnosis for rolling bearings based on fine-sorted
dispersion entropy and SVM optimized with mutation SCA-PSO."
Entropy
- 21.4 (2019): 404.
Returns the symbolic dynamic entropy (SyDy) and the symbolic sequence (Zt) of the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, symbols = 3, logarithm = natural, symbolic partition type = maximum entropy partitioning (MEP), normalisation = normalises w.r.t # possible vector permutations (c^m)
Returns the symbolic dynamic entropy (SyDy) and the symbolic sequence (Zt) of the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, symbols = 3, logarithm = natural, symbolic partition type = maximum entropy partitioning (MEP), normalisation = normalises w.r.t # possible vector permutations (c^m)
Returns the symbolic dynamic entropy (SyDy) and the symbolic sequence (Zt) of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer
tau - Time Delay, a positive integer
c - Number of symbols, an integer > 1
Typex - Type of symbolic sequnce partitioning method, one of the following:
{"linear","uniform","MEP"(default),"kmeans"}
Logx - Logarithm base, a positive scalar
Norm - Normalisation of SyDyEn value:
[false] no normalisation
[true] normalises w.r.t # possible vector permutations (c^m+1) - default
See the EntropyHub guide for more info on these parameters.
See also DispEn, PermEn, CondEn, SampEn, MSEn
References:
[1] Yongbo Li, et al.,
"A fault diagnosis scheme for planetary gearboxes using
modified multi-scale symbolic dynamic entropy and mRMR feature
@@ -182,7 +182,7 @@
[3] Venkatesh Rajagopalan and Asok Ray,
"Symbolic time series analysis via wavelet-based partitioning."
Signal processing
- 86.11 (2006): 3309-3320.
Returns the increment entropy (Incr) estimate of the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, quantifying resolution = 4, logarithm = base 2,
Incr = IncrEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, R::Int=4, Logx::Real=2, Norm::Bool=false)
Returns the increment entropy (Incr) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
tau - Time Delay, a positive integer
R - Quantifying resolution, a positive scalar
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
Norm - Normalisation of IncrEn value:
[false] no normalisation - default
+ 86.11 (2006): 3309-3320.
Returns the increment entropy (Incr) estimate of the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, quantifying resolution = 4, logarithm = base 2,
Incr = IncrEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, R::Int=4, Logx::Real=2, Norm::Bool=false)
Returns the increment entropy (Incr) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
tau - Time Delay, a positive integer
R - Quantifying resolution, a positive scalar
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
[1] Xiaofeng Liu, et al.,
"Increment entropy as a measure of complexity for time series."
Entropy
@@ -198,7 +198,7 @@
"Appropriate use of the increment entropy for
electrophysiological time series."
Computers in biology and medicine
- 95 (2018): 13-23.
Returns the cosine similarity entropy (CoSi) and the corresponding global probabilities estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, angular threshold = .1, logarithm = base 2,
Returns the cosine similarity entropy (CoSi) and the corresponding global probabilities estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, angular threshold = .1, logarithm = base 2,
Returns the phase entropy (Phas) estimate of the data sequence (Sig) using the default parameters: angular partitions = 4, time delay = 1, logarithm = natural,
Phas = PhasEn(Sig::AbstractArray{T,1} where T<:Real; K::Int=4, tau::Int=1, Logx::Real=exp(1), Norm::Bool=true, Plotx::Bool=false)
Returns the phase entropy (Phas) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
K - Angular partitions (coarse graining), an integer > 1
*Note: Division of partitions begins along the positive x-axis. As this point is somewhat arbitrary, it is
+ 19.12 (2017): 652.
Returns the phase entropy (Phas) estimate of the data sequence (Sig) using the default parameters: angular partitions = 4, time delay = 1, logarithm = natural,
Phas = PhasEn(Sig::AbstractArray{T,1} where T<:Real; K::Int=4, tau::Int=1, Logx::Real=exp(1), Norm::Bool=true, Plotx::Bool=false)
Returns the phase entropy (Phas) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
K - Angular partitions (coarse graining), an integer > 1
*Note: Division of partitions begins along the positive x-axis. As this point is somewhat arbitrary, it is
recommended to use even-numbered (preferably multiples of 4) partitions for sake of symmetry.
tau - Time Delay, a positive integer
Logx - Logarithm base, a positive scalar
Norm - Normalisation of Phas value:
[false] no normalisation
[true] normalises w.r.t. the number of partitions Log(`K`)
Returns the slope entropy (Slop) estimates for embedding dimensions [2, ..., m] of the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, angular thresholds = [5 45], logarithm = base 2
Slop = SlopEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, Lvls::AbstractArray{T,1} where T<:Real=[5, 45], Logx::Real=2, Norm::Bool=true)
Returns the slope entropy (Slop) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
SlopEn returns estimates for each dimension [2,...,m]
tau - Time Delay, a positive integer
Lvls - Angular thresolds, a vector of monotonically increasing values in the range [0 90] degrees.
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
Norm - Normalisation of SlopEn value, a boolean operator:
Returns the slope entropy (Slop) estimates for embedding dimensions [2, ..., m] of the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, angular thresholds = [5 45], logarithm = base 2
Slop = SlopEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, Lvls::AbstractArray{T,1} where T<:Real=[5, 45], Logx::Real=2, Norm::Bool=true)
Returns the slope entropy (Slop) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
SlopEn returns estimates for each dimension [2,...,m]
tau - Time Delay, a positive integer
Lvls - Angular thresolds, a vector of monotonically increasing values in the range [0 90] degrees.
Logx - Logarithm base, a positive scalar (enter 0 for natural log)
Norm - Normalisation of SlopEn value, a boolean operator:
[false] no normalisation
[true] normalises w.r.t. the number of patterns found (default)
See also PhasEn, GridEn, MSEn, CoSiEn, SampEn, ApEn
References:
[1] David Cuesta-Frau,
"Slope Entropy: A New Time Series Complexity Estimator Based on
Both Symbolic Patterns and Amplitude Information."
Entropy
- 21.12 (2019): 1167.
Returns the bubble entropy (Bubb) and the conditional Rényi entropy (H) estimates of dimension m = 2 from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, logarithm = natural
Bubb, H = BubbEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, Logx::Real=exp(1))
Returns the bubble entropy (Bubb) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
BubbEn returns estimates for each dimension [2,...,m]
tau - Time Delay, a positive integer
Logx - Logarithm base, a positive scalar
See also PhasEn, MSEn
References:
[1] George Manis, M.D. Aktaruzzaman and Roberto Sassi,
+ 21.12 (2019): 1167.
Returns the bubble entropy (Bubb) and the conditional Rényi entropy (H) estimates of dimension m = 2 from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, logarithm = natural
Bubb, H = BubbEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, Logx::Real=exp(1))
Returns the bubble entropy (Bubb) estimate of the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
BubbEn returns estimates for each dimension [2,...,m]
tau - Time Delay, a positive integer
Logx - Logarithm base, a positive scalar
See also PhasEn, MSEn
References:
[1] George Manis, M.D. Aktaruzzaman and Roberto Sassi,
"Bubble entropy: An entropy almost free of parameters."
IEEE Transactions on Biomedical Engineering
- 64.11 (2017): 2711-2718.
Returns the gridded distribution entropy (GDE) and the gridded distribution rate (GDR) estimated from the data sequence (Sig) using the default parameters: grid coarse-grain = 3, time delay = 1, logarithm = base 2
GDE, GDR, PIx, GIx, SIx, AIx = GridEn(Sig)
In addition to GDE and GDR, GridEn returns the following indices estimated for the data sequence (Sig) using the default parameters: [PIx] - Percentage of points below the line of identity (LI) [GIx] - Proportion of point distances above the LI [SIx] - Ratio of phase angles (w.r.t. LI) of the points above the LI [AIx] - Ratio of the cumulative area of sectors of points above the LI
Returns the gridded distribution entropy (GDE) and the gridded distribution rate (GDR) estimated from the data sequence (Sig) using the default parameters: grid coarse-grain = 3, time delay = 1, logarithm = base 2
GDE, GDR, PIx, GIx, SIx, AIx = GridEn(Sig)
In addition to GDE and GDR, GridEn returns the following indices estimated for the data sequence (Sig) using the default parameters: [PIx] - Percentage of points below the line of identity (LI) [GIx] - Proportion of point distances above the LI [SIx] - Ratio of phase angles (w.r.t. LI) of the points above the LI [AIx] - Ratio of the cumulative area of sectors of points above the LI
Returns the entropy of entropy (EoE), the average Shannon entropy (AvEn), and the number of levels (S2) across all windows estimated from the data sequence (Sig) using the default parameters: window length (samples) = 10, slices = 10, logarithm = natural, heartbeat interval range (xmin, xmax) = (min(Sig), max(Sig))
Returns the entropy of entropy (EoE), the average Shannon entropy (AvEn), and the number of levels (S2) across all windows estimated from the data sequence (Sig) using the default parameters: window length (samples) = 10, slices = 10, logarithm = natural, heartbeat interval range (xmin, xmax) = (min(Sig), max(Sig))
Returns the attention entropy (Av4) calculated as the average of the sub-entropies (Hxx,Hxn,Hnn,Hnx) estimated from the data sequence (Sig) using a base-2 logarithm.
Av4, (Hxx, Hnn, Hxn, Hnx) = AttnEn(Sig::AbstractArray{T,1} where T<:Real; Logx::Real=2)
Returns the attention entropy (Av4) and the sub-entropies (Hxx,Hnn,Hxn,Hnx) from the data sequence (Sig) where, Hxx: entropy of local-maxima intervals Hnn: entropy of local minima intervals Hxn: entropy of intervals between local maxima and subsequent minima Hnx: entropy of intervals between local minima and subsequent maxima
Arguments:
Logx - Logarithm base, a positive scalar (Enter 0 for natural logarithm)
Returns the attention entropy (Av4) calculated as the average of the sub-entropies (Hxx,Hxn,Hnn,Hnx) estimated from the data sequence (Sig) using a base-2 logarithm.
Av4, (Hxx, Hnn, Hxn, Hnx) = AttnEn(Sig::AbstractArray{T,1} where T<:Real; Logx::Real=2)
Returns the attention entropy (Av4) and the sub-entropies (Hxx,Hnn,Hxn,Hnx) from the data sequence (Sig) where, Hxx: entropy of local-maxima intervals Hnn: entropy of local minima intervals Hxn: entropy of intervals between local maxima and subsequent minima Hnx: entropy of intervals between local minima and subsequent maxima
Arguments:
Logx - Logarithm base, a positive scalar (Enter 0 for natural logarithm)
See also EnofEn, SpecEn, XSpecEn, PermEn, MSEn
References:
[1] Jiawei Yang, et al.,
"Classification of Interbeat Interval Time-series Using
Attention Entropy."
IEEE Transactions on Affective Computing
- (2020)
Returns the range entropy estimate (Rangx) and the number of matched state vectors (m: B, m+1: A) estimated from the data sequence (Sig) using the sample entropy algorithm and the following default parameters: embedding dimension = 2, time delay = 1, radius threshold = 0.2, logarithm = natural.
Rangx, A, B = RangEn(Sig, keyword = value, ...)
Returns the range entropy estimates (Rangx) for dimensions = m estimated for the data sequence (Sig) using the specified keyword arguments:
Arguments:
m - Embedding Dimension, a positive integer tau - Time Delay, a positive integer r - Radius Distance Threshold, a positive value between 0 and 1 Methodx - Base entropy method, either 'SampEn' [default] or 'ApEn' Logx - Logarithm base, a positive scalar
Returns the range entropy estimate (Rangx) and the number of matched state vectors (m: B, m+1: A) estimated from the data sequence (Sig) using the sample entropy algorithm and the following default parameters: embedding dimension = 2, time delay = 1, radius threshold = 0.2, logarithm = natural.
Rangx, A, B = RangEn(Sig, keyword = value, ...)
Returns the range entropy estimates (Rangx) for dimensions = m estimated for the data sequence (Sig) using the specified keyword arguments:
Arguments:
m - Embedding Dimension, a positive integer tau - Time Delay, a positive integer r - Radius Distance Threshold, a positive value between 0 and 1 Methodx - Base entropy method, either 'SampEn' [default] or 'ApEn' Logx - Logarithm base, a positive scalar
See also ApEn, SampEn, FuzzEn, MSEn
References:
[1] Omidvarnia, Amir, et al.
"Range entropy: A bridge between signal complexity and self-similarity"
Entropy
20.12 (2018): 962.
@@ -258,7 +258,7 @@
"Physiological time-series analysis using approximate entropy
and sample entropy."
American Journal of Physiology-Heart and Circulatory Physiology
- 2000
Returns the diversity entropy (Div), the cumulative diversity entropy (CDEn), and the corresponding probabilities (Bm) estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, #bins = 5, logarithm = natural,
Returns the diversity entropy (Div), the cumulative diversity entropy (CDEn), and the corresponding probabilities (Bm) estimated from the data sequence (Sig) using the default parameters: embedding dimension = 2, time delay = 1, #bins = 5, logarithm = natural,
Returns the diversity entropy (Div) estimated from the data sequence (Sig) using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1
tau - Time Delay, a positive integer
r - Histogram bins #: either
* an integer [1 < `r`] representing the number of bins
* a list/numpy array of 3 or more increasing values in range [-1 1] representing the bin edges including the rightmost edge.
Logx - Logarithm base, a positive scalar (Enter 0 for natural logarithm)
See also CoSiEn, PhasEn, SlopEn, GridEn, MSEn
References:
[1] X. Wang, S. Si and Y. Li,
"Multiscale Diversity Entropy: A Novel Dynamical Measure for Fault
Diagnosis of Rotating Machinery,"
@@ -269,4 +269,4 @@
"Cumulative Diversity Pattern Entropy (CDEn): A High-Performance,
Almost-Parameter-Free Complexity Estimator for Nonstationary Time Series,"
IEEE Transactions on Industrial Informatics
- vol. 19, no. 9, pp. 9642-9653, Sept. 2023
Functions for estimating the entropy of a two-dimensional univariate matrix.
While EntropyHub functions primarily apply to time series data, with the following bidimensional entropy functions one can estimate the entropy of two-dimensional (2D) matrices. Hence, bidimensional entropy functions are useful for applications such as image analysis.
IMPORTANT: Locked Matrix Size
Each bidimensional entropy function (SampEn2D, FuzzEn2D, DistEn2D, DispEn2D, EspEn2D, PermEn2D) 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.
The reason for this is because there are hundreds of millions of pairwise calculations performed in the estimation of bidimensional entropy, so memory errors often occur when storing data on RAM.
e.g. For a matrix of size [200 x 200], an embedding dimension (m) = 3, and a time delay (tau) = 1, there are 753,049,836 pairwise matrix comparisons (6,777,448,524 elemental subtractions). To pass matrices with sizes greater than [128 x 128], set Lock = false.
CAUTION: unlocking the permitted matrix size may cause your Julia IDE to crash.
Returns the bidimensional sample entropy estimate (SE2D) and the number of matched sub-matricess (m:Phi1, m+1:Phi2) estimated for the data matrix (Mat) using the default parameters: time delay = 1, radius distance threshold = 0.2*SD(Mat), logarithm = natural matrix template size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum dimension size of Mat must be > 10.**
Functions for estimating the entropy of a two-dimensional univariate matrix.
While EntropyHub functions primarily apply to time series data, with the following bidimensional entropy functions one can estimate the entropy of two-dimensional (2D) matrices. Hence, bidimensional entropy functions are useful for applications such as image analysis.
IMPORTANT: Locked Matrix Size
Each bidimensional entropy function (SampEn2D, FuzzEn2D, DistEn2D, DispEn2D, EspEn2D, PermEn2D) 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.
The reason for this is because there are hundreds of millions of pairwise calculations performed in the estimation of bidimensional entropy, so memory errors often occur when storing data on RAM.
e.g. For a matrix of size [200 x 200], an embedding dimension (m) = 3, and a time delay (tau) = 1, there are 753,049,836 pairwise matrix comparisons (6,777,448,524 elemental subtractions). To pass matrices with sizes greater than [128 x 128], set Lock = false.
CAUTION: unlocking the permitted matrix size may cause your Julia IDE to crash.
Returns the bidimensional sample entropy estimate (SE2D) and the number of matched sub-matricess (m:Phi1, m+1:Phi2) estimated for the data matrix (Mat) using the default parameters: time delay = 1, radius distance threshold = 0.2*SD(Mat), logarithm = natural matrix template size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum dimension size of Mat must be > 10.**
Returns the bidimensional sample entropy (SE2D) estimates for the data matrix (Mat) using the specified 'keyword' arguments:
Arguments:
m - Template submatrix dimensions, an integer scalar (i.e. the same height and width) or a two-element vector of integers [height, width] with a minimum value > 1. (default: [floor(H/10) floor(W/10)])
tau - Time Delay, a positive integer (default: 1)
r - Distance Threshold, a positive scalar (default: 0.2*SD(Mat))
Logx - Logarithm base, a positive scalar (default: natural)
Lock - By default, SampEn2D only permits matrices with a maximum size of 128 x 128 to prevent memory errors when storing data on RAM. e.g. For Mat = [200 x 200], m = 3, and tau = 1, SampEn2D creates a vector of 753049836 elements. To enable matrices greater than [128 x 128] elements, set Lock to false. (default: true)
`WARNING: unlocking the permitted matrix size may cause your Julia
IDE to crash.`
Returns the bidimensional fuzzy entropy estimate (Fuzz2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, fuzzy function (Fx) = 'default', fuzzy function parameters (r) = [0.2, 2], logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height and width of the data matrix 'Mat')
** The minimum dimension size of Mat must be > 10.**
Returns the bidimensional fuzzy entropy estimate (Fuzz2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, fuzzy function (Fx) = 'default', fuzzy function parameters (r) = [0.2, 2], logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height and width of the data matrix 'Mat')
** The minimum dimension size of Mat must be > 10.**
Returns the bidimensional fuzzy entropy (Fuzz2D) estimates for the data matrix (Mat) using the specified 'keyword' arguments:
Arguments:
m - Template submatrix dimensions, an integer scalar (i.e. the same height and width) or a two-element vector of integers [height, width] with a minimum value > 1. (default: [floor(H/10) floor(W/10)])
tau - Time Delay, a positive integer (default: 1)
Fx - Fuzzy function name, one of the following: {"sigmoid", "modsampen", "default", "gudermannian","bell", "triangular", "trapezoidal1", "trapezoidal2","z_shaped", "gaussian", "constgaussian"}
r - Fuzzy function parameters, a 1 element scalar or a 2 element vector of positive values. The 'r' parameters for each fuzzy function are defined as follows:
sigmoid: r(1) = divisor of the exponential argument
r(2) = value subtracted from argument (pre-division)
@@ -46,18 +46,18 @@
"Fuzzy Entropy Metrics for the Analysis of Biomedical Signals:
Assessment and Comparison"
IEEE Access
- 7 (2019): 104833-104847
Returns the bidimensional distribution entropy estimate (Dist2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, histogram binning method = "sturges", logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum number of rows and columns of Mat must be > 10.**
Returns the bidimensional distribution entropy estimate (Dist2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, histogram binning method = "sturges", logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum number of rows and columns of Mat must be > 10.**
Returns the bidimensional distribution entropy (Dist2D) estimate for the data matrix (Mat) using the specified 'keyword' arguments:
Arguments:
m - Template submatrix dimensions, an integer scalar (i.e. the same height and width) or a two-element tuple of integers [height, width] with a minimum value > 1. [default: [floor(H/10) floor(W/10)]]
tau - Time Delay, a positive integer [default: 1]
Bins - Histogram bin selection method for distance distribution, an integer > 1 indicating the number of bins, or one of the following strings {"sturges", "sqrt", "rice", "doanes"`} [default: 'sturges']
Logx - Logarithm base, a positive scalar [default: natural]
** enter 0 for natural logarithm.**
Norm - Normalisation of Dist2D value, one of the following integers: [0] no normalisation. [1] normalises values of data matrix (Mat) to range [0 1]. [2] normalises values of data matrix (Mat) to range [0 1], and normalises the distribution entropy value (Dist2D) w.r.t the number of histogram bins. [default] [3] normalises the distribution entropy value w.r.t the number of histogram bins, without normalising data matrix values.
Lock - By default, DistEn2D only permits matrices with a maximum size of 128 x 128 to prevent memory errors when storing data on RAM. e.g. For Mat = [200 x 200], m = 3, and tau = 1, DistEn2D creates a vector of 753049836 elements. To enable matrices greater than [128 x 128] elements, set Lock to false. [default: 'true'] WARNING: unlocking the permitted matrix size may cause your Julia IDE to crash.
See also DistEn, XDistEn, SampEn2D, FuzzEn2D, MSEn
References:
[1] Hamed Azami, Javier Escudero and Anne Humeau-Heurtier,
"Bidimensional distribution entropy to analyze the irregularity
of small-sized textures."
IEEE Signal Processing Letters
- 24.9 (2017): 1338-1342.
Returns the bidimensional dispersion entropy estimate (Disp2D) and reverse bidimensional dispersion entropy (RDE) estimated for the data matrix (Mat) using the default parameters: time delay = 1, symbols = 3, logarithm = natural, data transform = normalised cumulative density function ('ncdf'), logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum number of rows and columns of Mat must be > 10.**
Disp2D, RDE = DispEn2D(Mat::AbstractArray{T,2} where T<:Real;
+ 24.9 (2017): 1338-1342.
Returns the bidimensional dispersion entropy estimate (Disp2D) and reverse bidimensional dispersion entropy (RDE) estimated for the data matrix (Mat) using the default parameters: time delay = 1, symbols = 3, logarithm = natural, data transform = normalised cumulative density function ('ncdf'), logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum number of rows and columns of Mat must be > 10.**
Returns the bidimensional dispersion entropy (Disp2D) and reverse bidimensional distribution entropy (RDE) estimate for the data matrix (Mat) using the specified 'keyword' arguments:
Arguments:
m - Template submatrix dimensions, an integer scalar (i.e. the same height and width) or a two-element tuple of integers [height, width] with a minimum value > 1. [default: [floor(H/10) floor(W/10)]]
tau - Time Delay, a positive integer [default: 1]
c - Number of symbols, an integer > 1 Typex - Type of symbolic mapping transform, one of the following: {linear, kmeans, ncdf, equal} See the EntropyHub Guide for more info on these transforms. Logx - Logarithm base, a positive scalar [default: natural]
** enter 0 for natural logarithm.**
Norm - Normalisation of Disp2D value, a boolean: - [false] no normalisation - default - [true] normalises w.r.t number of possible dispersion patterns. Lock - By default, DispEn2D only permits matrices with a maximum size of 128 x 128 to prevent memory errors when storing data on RAM. e.g. For Mat = [200 x 200], m = 3, and tau = 1, DispEn2D creates a vector of 753049836 elements. To enable matrices greater than [128 x 128] elements, set Lock to false. [default: 'true'] WARNING: unlocking the permitted matrix size may cause your Julia IDE to crash.
See also DispEn, DistEn2D, SampEn2D, FuzzEn2D, MSEn
References:
[1] Hamed Azami, et al.,
"Two-dimensional dispersion entropy: An information-theoretic
method for irregularity analysis of images."
Signal Processing: Image Communication,
- 75 (2019): 178-187.
Returns the bidimensional permutation entropy estimate (Perm2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum dimension size of Mat must be > 10.**
Returns the bidimensional permutation entropy estimate (Perm2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, logarithm = natural, template matrix size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat)
** The minimum dimension size of Mat must be > 10.**
Returns the bidimensional permutation entropy (Perm2D) estimates for the data matrix (Mat) using the specified 'keyword' arguments:
Arguments:
m - Template submatrix dimensions, an integer scalar (i.e. the same height and width) or a two-element vector of integers [height, width] with a minimum value > 1. (default: [floor(H/10) floor(W/10)])
tau - Time Delay, a positive integer (default: 1)
Norm - Normalization of permutation entropy estimate, a boolean (default: true)
Logx - Logarithm base, a positive scalar (default: natural)
Lock - By default, PermEn2D only permits matrices with a maximum size of 128 x 128 to prevent memory errors when storing data on RAM. e.g. For Mat = [200 x 200], m = 3, and tau = 1, SampEn2D creates a vector of 753049836 elements. To enable matrices greater than [128 x 128] elements, set Lock to false. (default: true)
`WARNING: unlocking the permitted matrix size may cause your Julia
IDE to crash.`
NOTE - The original bidimensional permutation entropy algorithms [1][2] do not account for equal-valued elements of the embedding matrices. To overcome this, PermEn2D uses the lowest common rank for such instances. For example, given an embedding matrix A where, A = [3.4 5.5 7.3] |2.1 6 9.9| [7.3 1.1 2.1] would normally be mapped to an ordinal pattern like so, [3.4 5.5 7.3 2.1 6 9.9 7.3 1.1 2.1] => [ 8 4 9 1 2 5 3 7 6 ] However, indices 4 & 9, and 3 & 7 have the same values, 2.1 and 7.3 respectively. Instead, PermEn2D uses the ordinal pattern [ 8 4 4 1 2 5 3 3 6 ] where the lowest rank (4 & 3) are used instead (of 9 & 7). Therefore, the number of possible permutations is no longer (mxmy)!, but (mxmy)^(mxmy). Here, the PermEn2D value is normalized by the maximum Shannon entropy (Smax = log((mxmy)!) $assuming that no equal values are found in the permutation motif matrices$, as presented in [1].
See also SampEn2D, FuzzEn2D, DispEn2D, DistEn2D
References:
[1] Haroldo Ribeiro et al.,
"Complexity-Entropy Causality Plane as a Complexity Measure
@@ -71,10 +71,10 @@
[3] Matthew Flood and Bernd Grimm,
"EntropyHub: An Open-source Toolkit for Entropic Time Series Analysis"
- PLoS ONE (2021) 16(11): e0259448.
Returns the bidimensional Espinosa entropy estimate (Esp2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, tolerance threshold = 20, percentage similarity = 0.7 logarithm = natural, matrix template size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat) ** The minimum number of rows and columns of Mat must be > 10.
Esp2D = EspEn2D(Mat::AbstractArray{T,2} where T<:Real; m::Union{Int,Tuple{Int,Int}}=floor.(Int, size(Mat)./10),
+ PLoS ONE (2021) 16(11): e0259448.
Returns the bidimensional Espinosa entropy estimate (Esp2D) estimated for the data matrix (Mat) using the default parameters: time delay = 1, tolerance threshold = 20, percentage similarity = 0.7 logarithm = natural, matrix template size = [floor(H/10) floor(W/10)], (where H and W represent the height (rows) and width (columns) of the data matrix Mat) ** The minimum number of rows and columns of Mat must be > 10.
Returns the bidimensional Espinosa entropy (Esp2D) estimates for the data matrix (Mat) using the specified 'keyword' arguments:
Arguments:
m - Template submatrix dimensions, an integer scalar (i.e. the same height and width) or a two-element vector of integers [height, width] with a minimum value > 1. (default: [floor(H/10) floor(W/10)])
tau - Time Delay, a positive integer (default: 1)
r - Tolerance threshold, a positive scalar (default: 20)
ps - Percentage similarity, a value in range [0 1], (default: 0.7)
Logx - Logarithm base, a positive scalar (default: natural)
Lock - By default, EspEn2D only permits matrices with a maximum size of 128 x 128 to prevent memory errors when storing data on RAM. e.g. For Mat = [200 x 200], m = 3, and tau = 1, EspEn2D creates a vector of 753049836 elements. To enable matrices greater than [128 x 128] elements, set Lock to false. (default: true)
`WARNING: unlocking the permitted matrix size may cause your Julia
IDE to crash.`
See also SampEn2D, FuzzEn2D, DispEn2D, DistEn2D, PermEn2D
References:
[1] Ricardo Espinosa, et al.,
"Two-dimensional EspEn: A New Approach to Analyze Image Texture
by Irregularity."
Entropy,
- 23:1261 (2021)
Functions for estimating the cross-entropy between two univariate time series.
The following functions also form the cross-entropy method used by Multiscale Cross-Entropy functions.
These functions are directly available when EntropyHub is imported:
julia> using EntropyHub
julia> names(EntropyHub)
:ApEn
:AttnEn
:BubbEn
@@ -14,7 +14,7 @@
[2] Steven Pincus,
"Assessing serial irregularity and its implications for health."
Annals of the New York Academy of Sciences
- 954.1 (2001): 245-267.
Returns the cross-sample entropy estimates (XSamp) and the number of matched vectors (m:B, m+1:A) for m = [0,1,2] estimated for the two univariate data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, radius distance threshold= 0.2*SDpooled(Sig1,Sig2), logarithm = natural
XSamp, A, B, (Vcp, Ka, Kb) = XSampEn(Sig1, Sig2, ..., Vcp = true)
If Vcp == true, an additional tuple (Vcp, Ka, Kb) is returned with the cross-sample entropy estimates (XSamp) and the number of matched state vectors (m: B, m+1: A). (Vcp, Ka, Kb) contains the variance of the conditional probabilities (Vcp), i.e. CP = A/B, and the number of overlapping matching vector pairs of lengths m+1 (Ka) and m (Kb), respectively. Note Vcp is undefined for the zeroth embedding dimension (m = 0) and due to the computational demand, will take substantially more time to return function outputs. See Appendix B in [2] for more info.
XSamp, A, B = XSampEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, r::Union{Real,Nothing}=nothing, Logx::Real=exp(1), Vcp::Bool=false)
Returns the cross-sample entropy estimates (XSamp) for dimensions [0,1,...,m] estimated between the data sequences in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
r - Radius Distance Threshold, a positive scalar [default: 0.2*SDpooled(Sig1,Sig2)]
Logx - Logarithm base, a positive scalar [default: natural]
See also XFuzzEn, XApEn, SampEn, SampEn2D, XMSEn, ApEn
References:
[1] Joshua S Richman and J. Randall Moorman.
+ 954.1 (2001): 245-267.
Returns the cross-sample entropy estimates (XSamp) and the number of matched vectors (m:B, m+1:A) for m = [0,1,2] estimated for the two univariate data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, radius distance threshold= 0.2*SDpooled(Sig1,Sig2), logarithm = natural
XSamp, A, B, (Vcp, Ka, Kb) = XSampEn(Sig1, Sig2, ..., Vcp = true)
If Vcp == true, an additional tuple (Vcp, Ka, Kb) is returned with the cross-sample entropy estimates (XSamp) and the number of matched state vectors (m: B, m+1: A). (Vcp, Ka, Kb) contains the variance of the conditional probabilities (Vcp), i.e. CP = A/B, and the number of overlapping matching vector pairs of lengths m+1 (Ka) and m (Kb), respectively. Note Vcp is undefined for the zeroth embedding dimension (m = 0) and due to the computational demand, will take substantially more time to return function outputs. See Appendix B in [2] for more info.
XSamp, A, B = XSampEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, r::Union{Real,Nothing}=nothing, Logx::Real=exp(1), Vcp::Bool=false)
Returns the cross-sample entropy estimates (XSamp) for dimensions [0,1,...,m] estimated between the data sequences in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
r - Radius Distance Threshold, a positive scalar [default: 0.2*SDpooled(Sig1,Sig2)]
Logx - Logarithm base, a positive scalar [default: natural]
Vcp - Option to return the variance of the conditional probabilities and the number of overlapping matching vector pairs of lengths
See also XFuzzEn, XApEn, SampEn, SampEn2D, XMSEn, ApEn
References:
[1] Joshua S Richman and J. Randall Moorman.
"Physiological time-series analysis using approximate entropy
and sample entropy."
American Journal of Physiology-Heart and Circulatory Physiology
@@ -23,7 +23,7 @@
[2] Douglas E Lake, Joshua S Richman, M.P. Griffin, J. Randall Moorman
"Sample entropy analysis of neonatal heart rate variability."
American Journal of Physiology-Regulatory, Integrative and Comparative Physiology
- 283, no. 3 (2002): R789-R797.
Returns the cross-fuzzy entropy estimates (XFuzz) and the average fuzzy distances (m:Ps1, m+1:Ps2) for m = [1,2] estimated for the data sequences contained in Sig1 and Sig2, using the default parameters: embedding dimension = 2, time delay = 1, fuzzy function (Fx) = 'default', fuzzy function parameters (r) = [0.2, 2], logarithm = natural
XFuzz, Ps1, Ps2 = XFuzzEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, r::Union{Real,Tuple{Real,Real}}=(.2,2), Fx::String="default", Logx::Real=exp(1))
Returns the cross-fuzzy entropy estimates (XFuzz) for dimensions = [1,...,m] estimated for the data sequences in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
Fx - Fuzzy function name, one of the following: {"sigmoid", "modsampen", "default", "gudermannian","bell", "triangular", "trapezoidal1", "trapezoidal2","z_shaped", "gaussian", "constgaussian"}
r - Fuzzy function parameters, a scalar or a 2 element tuple of positive values. The r parameters for each fuzzy function are defined as follows:
sigmoid: r(1) = divisor of the exponential argument
+ 283, no. 3 (2002): R789-R797.
Returns the cross-fuzzy entropy estimates (XFuzz) and the average fuzzy distances (m:Ps1, m+1:Ps2) for m = [1,2] estimated for the data sequences contained in Sig1 and Sig2, using the default parameters: embedding dimension = 2, time delay = 1, fuzzy function (Fx) = 'default', fuzzy function parameters (r) = [0.2, 2], logarithm = natural
XFuzz, Ps1, Ps2 = XFuzzEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, r::Union{Real,Tuple{Real,Real}}=(.2,2), Fx::String="default", Logx::Real=exp(1))
Returns the cross-fuzzy entropy estimates (XFuzz) for dimensions = [1,...,m] estimated for the data sequences in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
Fx - Fuzzy function name, one of the following: {"sigmoid", "modsampen", "default", "gudermannian","bell", "triangular", "trapezoidal1", "trapezoidal2","z_shaped", "gaussian", "constgaussian"}
r - Fuzzy function parameters, a scalar or a 2 element tuple of positive values. The r parameters for each fuzzy function are defined as follows:
sigmoid: r(1) = divisor of the exponential argument
r(2) = value subtracted from argument (pre-division)
modsampen: r(1) = divisor of the exponential argument
r(2) = value subtracted from argument (pre-division)
@@ -55,20 +55,20 @@
"Fuzzy Entropy Metrics for the Analysis of Biomedical Signals:
Assessment and Comparison"
IEEE Access
- 7 (2019): 104833-104847
Returns the cross-Kolmogorov entropy estimates (XK2) and the correlation integrals (Ci) for m = [1,2] estimated between the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, distance threshold (r) = 0.2*SDpooled(Sig1, Sig2), logarithm = natural
XK2, Ci = XK2En(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, r::Union{Real,Nothing}=nothing, Logx::Real=exp(1))
Returns the cross-Kolmogorov entropy estimates (XK2) estimated between the data sequences contained in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
r - Radius Distance Threshold, a positive scalar [default: 0.2*SDpooled(Sig1,Sig2)]
Logx - Logarithm base, a positive scalar [default: natural]
See also XSampEn, XFuzzEn, XApEn, K2En, XMSEn, XDistEn
Returns the cross-Kolmogorov entropy estimates (XK2) and the correlation integrals (Ci) for m = [1,2] estimated between the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, distance threshold (r) = 0.2*SDpooled(Sig1, Sig2), logarithm = natural
XK2, Ci = XK2En(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, r::Union{Real,Nothing}=nothing, Logx::Real=exp(1))
Returns the cross-Kolmogorov entropy estimates (XK2) estimated between the data sequences contained in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
r - Radius Distance Threshold, a positive scalar [default: 0.2*SDpooled(Sig1,Sig2)]
Logx - Logarithm base, a positive scalar [default: natural]
See also XSampEn, XFuzzEn, XApEn, K2En, XMSEn, XDistEn
References:
[1] Matthew W. Flood,
"XK2En - EntropyHub Project"
- (2021) https://github.com/MattWillFlood/EntropyHub
Returns the cross-permuation entropy estimates (XPerm) estimated betweeen the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 3, time delay = 1, logarithm = base 2,
XPerm = XPermEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=3, tau::Int=1, Logx::Real=exp(1))
Returns the permutation entropy estimates (XPerm) estimated between the data sequences contained in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 2 [default: 3]
**Note: XPerm is undefined for embedding dimensions < 3.**
tau - Time Delay, a positive integer [default: 1]
Logx - Logarithm base, a positive scalar [default: 2] ** enter 0 for natural log.**
Returns the cross-permuation entropy estimates (XPerm) estimated betweeen the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 3, time delay = 1, logarithm = base 2,
XPerm = XPermEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=3, tau::Int=1, Logx::Real=exp(1))
Returns the permutation entropy estimates (XPerm) estimated between the data sequences contained in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 2 [default: 3]
**Note: XPerm is undefined for embedding dimensions < 3.**
tau - Time Delay, a positive integer [default: 1]
Logx - Logarithm base, a positive scalar [default: 2] ** enter 0 for natural log.**
See also PermEn, XApEn, XSampEn, XFuzzEn, XMSEn
References:
[1] Wenbin Shi, Pengjian Shang, and Aijing Lin,
"The coupling analysis of stock market indices based on
cross-permutation entropy."
Nonlinear Dynamics
- 79.4 (2015): 2439-2447.
Returns the corrected cross-conditional entropy estimates (XCond) and the corresponding Shannon entropies (m: SEw, m+1: SEz) for m = [1,2] estimated for the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, number of symbols = 6, logarithm = natural ** Note: XCondEn is direction-dependent. Therefore, the order of the data sequences Sig1 and Sig2 matters. If Sig1 is the sequence 'y', and Sig2 is the second sequence 'u', the XCond is the amount of information carried by y(i) when the pattern u(i) is found.**
XCond, SEw, SEz = XCondEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, c::Int=6, Logx::Real=exp(1), Norm::Bool=false)
Returns the corrected cross-conditional entropy estimates (XCond) for the data sequences contained in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1 [default: 2]
tau - Time Delay, a positive integer [default: 1]
c - Number of symbols, an integer > 1 [default: 6]
Logx - Logarithm base, a positive scalar [default: natural]
Norm - Normalisation of XCond values: [false] no normalisation [default]
[true] normalises w.r.t cross-Shannon entropy.
See also XFuzzEn, XSampEn, XApEn, XPermEn, CondEn, XMSEn
References:
[1] Alberto Porta, et al.,
+ 79.4 (2015): 2439-2447.
Returns the corrected cross-conditional entropy estimates (XCond) and the corresponding Shannon entropies (m: SEw, m+1: SEz) for m = [1,2] estimated for the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, number of symbols = 6, logarithm = natural ** Note: XCondEn is direction-dependent. Therefore, the order of the data sequences Sig1 and Sig2 matters. If Sig1 is the sequence 'y', and Sig2 is the second sequence 'u', the XCond is the amount of information carried by y(i) when the pattern u(i) is found.**
XCond, SEw, SEz = XCondEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, c::Int=6, Logx::Real=exp(1), Norm::Bool=false)
Returns the corrected cross-conditional entropy estimates (XCond) for the data sequences contained in Sig1 and Sig2 using the specified 'keyword' arguments:
Arguments:
m - Embedding Dimension, an integer > 1 [default: 2]
tau - Time Delay, a positive integer [default: 1]
c - Number of symbols, an integer > 1 [default: 6]
Logx - Logarithm base, a positive scalar [default: natural]
Norm - Normalisation of XCond values: [false] no normalisation [default]
[true] normalises w.r.t cross-Shannon entropy.
See also XFuzzEn, XSampEn, XApEn, XPermEn, CondEn, XMSEn
References:
[1] Alberto Porta, et al.,
"Conditional entropy approach for the evaluation of the
coupling strength."
Biological cybernetics
- 81.2 (1999): 119-129.
Returns the cross-distribution entropy estimate (XDist) and the corresponding distribution probabilities (Ppi) estimated between the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, binning method = 'Sturges', logarithm = base 2, normalisation = w.r.t # of histogram bins
XDist, Ppi = XDistEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, Bins::Union{Int,String}="Sturges", Logx::Real=2, Norm::Bool=true)
Returns the cross-distribution entropy estimate (XDist) estimated between the data sequences contained in Sig1 and Sig2 using the specified 'keyword' = arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
Bins - Histogram bin selection method for distance distribution, an integer > 1 indicating the number of bins, or one of the following strings {'sturges','sqrt','rice','doanes'} [default: 'sturges']
Logx - Logarithm base, a positive scalar [default: 2] ** enter 0 for natural log**
Norm - Normalisation of DistEn value: [false] no normalisation. [true] normalises w.r.t # of histogram bins [default]
See also XSampEn, XApEn, XPermEn, XCondEn, DistEn, DistEn2D, XMSEn
References:
[1] Yuanyuan Wang and Pengjian Shang,
+ 81.2 (1999): 119-129.
Returns the cross-distribution entropy estimate (XDist) and the corresponding distribution probabilities (Ppi) estimated between the data sequences contained in Sig1 and Sig2 using the default parameters: embedding dimension = 2, time delay = 1, binning method = 'Sturges', logarithm = base 2, normalisation = w.r.t # of histogram bins
XDist, Ppi = XDistEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; m::Int=2, tau::Int=1, Bins::Union{Int,String}="Sturges", Logx::Real=2, Norm::Bool=true)
Returns the cross-distribution entropy estimate (XDist) estimated between the data sequences contained in Sig1 and Sig2 using the specified 'keyword' = arguments:
Arguments:
m - Embedding Dimension, a positive integer [default: 2]
tau - Time Delay, a positive integer [default: 1]
Bins - Histogram bin selection method for distance distribution, an integer > 1 indicating the number of bins, or one of the following strings {'sturges','sqrt','rice','doanes'} [default: 'sturges']
Logx - Logarithm base, a positive scalar [default: 2] ** enter 0 for natural log**
Norm - Normalisation of DistEn value: [false] no normalisation. [true] normalises w.r.t # of histogram bins [default]
See also XSampEn, XApEn, XPermEn, XCondEn, DistEn, DistEn2D, XMSEn
References:
[1] Yuanyuan Wang and Pengjian Shang,
"Analysis of financial stock markets through the multiscale
cross-distribution entropy based on the Tsallis entropy."
Nonlinear Dynamics
- 94.2 (2018): 1361-1376.
Returns the cross-spectral entropy estimate (XSpec) of the full cross- spectrum and the within-band entropy (BandEn) estimated between the data sequences contained in Sig using the default parameters: N-point FFT = 2 * max(length(Sig1/Sig2)) + 1, normalised band edge frequencies = [0 1], logarithm = base 2, normalisation = w.r.t # of spectrum/band frequency values.
XSpec, BandEn = XSpecEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; N::Union{Nothing,Int}=nothing, Freqs::Tuple{Real,Real}=(0,1), Logx::Real=exp(1), Norm::Bool=true)
Returns the cross-spectral entropy (XSpec) and the within-band entropy (BandEn) estimate between the data sequences contained in Sig1 and Sig2 using the following specified 'keyword' arguments:
Arguments:
N - Resolution of spectrum (N-point FFT), an integer > 1
Freqs - Normalised band edge frequencies, a scalar in range [0 1] where 1 corresponds to the Nyquist frequency (Fs/2). Note: When no band frequencies are entered, BandEn == SpecEn
Logx - Logarithm base, a positive scalar [default: base 2] ** enter 0 for natural log**
Norm - Normalisation of XSpec value: [false] no normalisation. [true] normalises w.r.t # of spectrum/band frequency values [default]
For more info, see the EntropyHub guide
See also SpecEn, fft, XDistEn, periodogram, XSampEn, XApEn
Returns the cross-spectral entropy estimate (XSpec) of the full cross- spectrum and the within-band entropy (BandEn) estimated between the data sequences contained in Sig using the default parameters: N-point FFT = 2 * max(length(Sig1/Sig2)) + 1, normalised band edge frequencies = [0 1], logarithm = base 2, normalisation = w.r.t # of spectrum/band frequency values.
XSpec, BandEn = XSpecEn(Sig1::Union{AbstractMatrix{T}, AbstractVector{T}} where T<:Real, Sig2::Union{AbstractVector{T} where T<:Real, Nothing} = nothing; N::Union{Nothing,Int}=nothing, Freqs::Tuple{Real,Real}=(0,1), Logx::Real=exp(1), Norm::Bool=true)
Returns the cross-spectral entropy (XSpec) and the within-band entropy (BandEn) estimate between the data sequences contained in Sig1 and Sig2 using the following specified 'keyword' arguments:
Arguments:
N - Resolution of spectrum (N-point FFT), an integer > 1
Freqs - Normalised band edge frequencies, a scalar in range [0 1] where 1 corresponds to the Nyquist frequency (Fs/2). Note: When no band frequencies are entered, BandEn == SpecEn
Logx - Logarithm base, a positive scalar [default: base 2] ** enter 0 for natural log**
Norm - Normalisation of XSpec value: [false] no normalisation. [true] normalises w.r.t # of spectrum/band frequency values [default]
For more info, see the EntropyHub guide
See also SpecEn, fft, XDistEn, periodogram, XSampEn, XApEn
References:
[1] Matthew W. Flood,
"XSpecEn - EntropyHub Project"
- (2021) https://github.com/MattWillFlood/EntropyHub
Functions for estimating the multiscale entropy between two univariate time series.
Just as one can calculate multiscale entropy using any Base entropy, the same functionality is possible with multiscale cross-entropy using any Cross-entropy function: (XApEn, XSampEn, XK2En, XCondEn, XPermEn, XSpecEn, XDistEn, XFuzzEn).
To do so, we again use the MSobject function to pass a multiscale object (Mobj) to the multiscale cross-entropy functions.
NOTE:
Multiscale cross-entropy functions have three positional arguments:
Returns a vector of multiscale cross-entropy values MSx and the complexity index CI between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object Mobj over 3 temporal scales with coarse- graining default.
MSx,CI = MSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
+Multiscale Cross-Entropies · EntropyHub.jl
Functions for estimating the multiscale entropy between two univariate time series.
Just as one can calculate multiscale entropy using any Base entropy, the same functionality is possible with multiscale cross-entropy using any Cross-entropy function: (XApEn, XSampEn, XK2En, XCondEn, XPermEn, XSpecEn, XDistEn, XFuzzEn).
To do so, we again use the MSobject function to pass a multiscale object (Mobj) to the multiscale cross-entropy functions.
NOTE:
Multiscale cross-entropy functions have three positional arguments:
Returns a vector of multiscale cross-entropy values MSx and the complexity index CI between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object Mobj over 3 temporal scales with coarse- graining default.
MSx,CI = MSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
Scales::Int=3, Methodx::String="coarse", RadNew::Int=0, Plotx::Bool=false)
Returns a vector of multiscale cross-entropy values MSx and the complexity index CI of the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object Mobj and the following 'keyword' arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default: 3)
Method - Graining method, one of the following:
{`"coarse", "modified", "imf", "timeshift","generalized"`} [default: 'coarse']
For further info on graining procedures, see the Entropyhub guide.
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is XSampEn or XApEn, RadNew allows the radius threshold to be updated at each time scale (Xt). If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Pooled Standard Deviation - r*std(Xt)
@@ -38,7 +38,7 @@
[6] Antoine Jamin and Anne Humeau-Heurtier.
"(Multiscale) Cross-Entropy Methods: A Review."
Entropy
- 22.1 (2020): 45.
Returns a vector of composite multiscale cross-entropy values (MSx) between two univariate data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) using the composite multiscale method (cMSE) over 3 temporal scales.
MSx, CI = cXMSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
+ 22.1 (2020): 45.
Returns a vector of composite multiscale cross-entropy values (MSx) between two univariate data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) using the composite multiscale method (cMSE) over 3 temporal scales.
MSx, CI = cXMSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
Scales::Int=3, RadNew::Int=0, Refined::Bool=false, Plotx::Bool=false)
Returns a vector of composite multiscale cross-entropy values (MSx) between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) and the following keyword arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default: 3)
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is XSampEn or XApEn, RadNew rescales the radius threshold of the sub-sequences at each time scale (Ykj). If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Pooled Standard Deviation - r*std(Ykj)
[2] Pooled Variance - r*var(Ykj)
@@ -76,7 +76,7 @@
[6] Shuen-De Wu, et al.,
"Time series analysis using composite multiscale entropy."
Entropy
- 15.3 (2013): 1069-1084.
Returns a vector of refined multiscale cross-entropy values (MSx) and the complexity index (CI) between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) and the following default parameters: Scales = 3, Butterworth LPF Order = 6, Butterworth LPF cutoff frequency at scale (T): Fc = 0.5/T. If the entropy function specified by Mobj is XSampEn or XApEn, rMSEn updates the threshold radius of the data sequences (Xt) at each scale to 0.2SDpooled(Xa, Xb) when no r value is provided by Mobj, or rSDpooled(Xa, Xb) if r is specified.
MSx, CI = rXMSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
+ 15.3 (2013): 1069-1084.
Returns a vector of refined multiscale cross-entropy values (MSx) and the complexity index (CI) between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) and the following default parameters: Scales = 3, Butterworth LPF Order = 6, Butterworth LPF cutoff frequency at scale (T): Fc = 0.5/T. If the entropy function specified by Mobj is XSampEn or XApEn, rMSEn updates the threshold radius of the data sequences (Xt) at each scale to 0.2SDpooled(Xa, Xb) when no r value is provided by Mobj, or rSDpooled(Xa, Xb) if r is specified.
MSx, CI = rXMSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
Scales::Int=3, F_Order::Int=6, F_Num::Float64=0.5, RadNew::Int=0, Plotx::Bool=false)
Returns a vector of refined multiscale cross-entropy values (MSx) and the complexity index (CI) between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) and the following keyword arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default: 3)
F_Num - Numerator of Butterworth low-pass filter cutoff frequency, a scalar value in range [0 < F_Num < 1]. The cutoff frequency at each scale (T) becomes: Fc = F_Num/T. (default: 0.5)
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is XSampEn or XApEn, RadNew allows the radius threshold to be updated at each time scale (Xt). If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Pooled Standard Deviation - r*std(Xt)
[2] Pooled Variance - r*var(Xt)
@@ -123,7 +123,7 @@
[7] Antoine Jamin and Anne Humeau-Heurtier.
"(Multiscale) Cross-Entropy Methods: A Review."
Entropy
- 22.1 (2020): 45.
Returns a vector of cross-entropy values (MSx) calculated at each node in the hierarchical tree, the average cross-entropy value across all nodes at each scale (Sn), and the complexity index (CI) of the hierarchical tree (i.e. sum(Sn)) between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) over 3 temporal scales (default). The entropy values in MSx are ordered from the root node (S.00) to the Nth subnode at scale T (S.TN): i.e. S.00, S.10, S.11, S.20, S.21, S.22, S.23, S.30, S.31, S.32, S.33, S.34, S.35, S.36, S.37, S.40, ... , S.TN. The average cross-entropy values in Sn are ordered in the same way, with the value of the root node given first: i.e. S0, S1, S2, ..., ST
MSx, Sn, CI = hXMSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
+ 22.1 (2020): 45.
Returns a vector of cross-entropy values (MSx) calculated at each node in the hierarchical tree, the average cross-entropy value across all nodes at each scale (Sn), and the complexity index (CI) of the hierarchical tree (i.e. sum(Sn)) between the data sequences contained in Sig1 and Sig2 using the parameters specified by the multiscale object (Mobj) over 3 temporal scales (default). The entropy values in MSx are ordered from the root node (S.00) to the Nth subnode at scale T (S.TN): i.e. S.00, S.10, S.11, S.20, S.21, S.22, S.23, S.30, S.31, S.32, S.33, S.34, S.35, S.36, S.37, S.40, ... , S.TN. The average cross-entropy values in Sn are ordered in the same way, with the value of the root node given first: i.e. S0, S1, S2, ..., ST
MSx, Sn, CI = hXMSEn(Sig1::AbstractVector{T} where T<:Real, Sig2::AbstractVector{T} where T<:Real, Mobj::NamedTuple;
Scales::Int=3, RadNew::Int=0, Plotx::Bool=false)
Returns a vector of cross-entropy values (MSx) calculated at each node in the hierarchical tree, the average cross-entropy value across all nodes at each scale (Sn), and the complexity index (CI) of the entire hierarchical tree between the data sequences contained in Sig1 and Sig2 using the following name/value pair arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default: 3) At each scale (T), entropy is estimated for 2^(T-1) nodes.
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is XSampEn or XApEn, RadNew allows the radius threshold to be updated at each node in the tree. If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Pooled Standard Deviation - r*std(Xt)
[2] Pooled Variance - r*var(Xt)
@@ -145,4 +145,4 @@
[3] Ying Jiang, C-K. Peng and Yuesheng Xu,
"Hierarchical entropy analysis for biological signals."
Journal of Computational and Applied Mathematics
- 236.5 (2011): 728-742.
Functions for estimating the multiscale entropy between of a univariate time series.
Multiscale entropy can be calculated using any of the Base entropies: (ApEn, AttnEn, BubbEn, CondEn, CoSiEn, DistEn, DivEn, DispEn, EnofEn, FuzzEn, GridEn, IncrEn, K2En, PermEn, PhasEn, RangEn, SampEn, SlopEn, SpecEn, SyDyEn).
NOTE:
Multiscale cross-entropy functions have two positional arguments:
Returns a multiscale entropy object (Mobj) based on that originally proposed by Costa et. al. (2002) using the following default parameters: EnType = SampEn(), embedding dimension = 2, time delay = 1, radius = 0.2*SD(Sig), logarithm = natural
Mobj = MSobject(EnType::Function)
Returns a multiscale entropy object by passing the entropy function (EnType) and the specifying default parameters for that entropy function. To see the default parameters for a particular entropy method, type: ? EntropyHub.EnType
(e.g. ? EntropyHub.SampEn)
Mobj = MSobject(EnType::Function; kwargs...)
Returns a multiscale entropy object using the specified entropy method (EnType) and the 'keyword' parameters for that particular method. To see the default parameters for a particular entropy method, type: ? EntropyHub.EnType (e.g. ? EntropyHub.SampEn)
EnType can be any of the following entropy functions:
Functions for estimating the multiscale entropy between of a univariate time series.
Multiscale entropy can be calculated using any of the Base entropies: (ApEn, AttnEn, BubbEn, CondEn, CoSiEn, DistEn, DivEn, DispEn, EnofEn, FuzzEn, GridEn, IncrEn, K2En, PermEn, PhasEn, RangEn, SampEn, SlopEn, SpecEn, SyDyEn).
NOTE:
Multiscale cross-entropy functions have two positional arguments:
Returns a multiscale entropy object (Mobj) based on that originally proposed by Costa et. al. (2002) using the following default parameters: EnType = SampEn(), embedding dimension = 2, time delay = 1, radius = 0.2*SD(Sig), logarithm = natural
Mobj = MSobject(EnType::Function)
Returns a multiscale entropy object by passing the entropy function (EnType) and the specifying default parameters for that entropy function. To see the default parameters for a particular entropy method, type: ? EntropyHub.EnType
(e.g. ? EntropyHub.SampEn)
Mobj = MSobject(EnType::Function; kwargs...)
Returns a multiscale entropy object using the specified entropy method (EnType) and the 'keyword' parameters for that particular method. To see the default parameters for a particular entropy method, type: ? EntropyHub.EnType (e.g. ? EntropyHub.SampEn)
EnType can be any of the following entropy functions:
Returns a vector of multiscale entropy values MSx and the complexity index CI of the data sequence Sig using the parameters specified by the multiscale object Mobj over 3 temporal scales with coarse- graining (default).
MSx, CI = MSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple; Scales::Int=3,
+`XSpecEn` - Cross-Spectral Entropy
See also MSEn, XMSEn, rMSEn, cMSEn, hMSEn, rXMSEn, cXMSEn, hXMSEn
Returns a vector of multiscale entropy values MSx and the complexity index CI of the data sequence Sig using the parameters specified by the multiscale object Mobj over 3 temporal scales with coarse- graining (default).
MSx, CI = MSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple; Scales::Int=3,
Methodx::String="coarse", RadNew::Int=0, Plotx::Bool=false)
Returns a vector of multiscale entropy values MSx and the complexity index CI of the data sequence Sig using the parameters specified by the multiscale object Mobj and the following 'keyword' arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default: 3)
Method - Graining method, one of the following: {coarse,modified,imf,timeshift,generalized} [default = coarse] For further info on these graining procedures, see the EntropyHub guide.
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is SampEn or ApEn, RadNew allows the radius threshold to be updated at each time scale (Xt). If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Standard Deviation - r*std(Xt)
[2] Variance - r*var(Xt)
@@ -123,14 +123,14 @@
[12] Madalena Costa and Ary L. Goldberger,
"Generalized multiscale entropy analysis: Application to quantifying
the complex volatility of human heartbeat time series."
- Entropy 17.3 (2015): 1197-1203.
Returns a vector of composite multiscale entropy values (MSx) for the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) using the composite multiscale entropy method over 3 temporal scales.
MSx, CI = cMSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple;
+ Entropy 17.3 (2015): 1197-1203.
Returns a vector of composite multiscale entropy values (MSx) for the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) using the composite multiscale entropy method over 3 temporal scales.
MSx, CI = cMSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple;
Scales::Int=3, RadNew::Int=0, Refined::Bool=false, Plotx::Bool=false)
Returns a vector of composite multiscale entropy values (MSx) of the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) and the following 'keyword' arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default: 3)
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is SampEn or ApEn, RadNew allows the radius threshold to be updated at each time scale (Xt). If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Standard Deviation - r*std(Xt)
[2] Variance - r*var(Xt)
[3] Mean Absolute Deviation - r*mean_ad(Xt)
- [4] Median Absolute Deviation - r*med_ad(Xt)
Refined - Refined-composite MSEn method. When Refined == true and the entropy function specified by Mobj is SampEn, cMSEn returns the refined-composite multiscale entropy (rcMSEn) [default: false]
Plotx - When Plotx == true, returns a plot of the entropy value at each time scale (i.e. the multiscale entropy curve) [default: false]
See also MSobject, rMSEn, MSEn, hMSEn, SampEn, ApEn, XMSEn
References:
[1] Madalena Costa, Ary Goldberger, and C-K. Peng,
+ [4] Median Absolute Deviation - r*med_ad(Xt)
Refined - Refined-composite MSEn method. When Refined == true and the entropy function specified by Mobj is SampEn or FuzzEn, cMSEn returns the refined-composite multiscale entropy (rcMSEn) [default: false]
Plotx - When Plotx == true, returns a plot of the entropy value at each time scale (i.e. the multiscale entropy curve) [default: false]
See also MSobject, rMSEn, MSEn, hMSEn, SampEn, ApEn, XMSEn
References:
[1] Madalena Costa, Ary Goldberger, and C-K. Peng,
"Multiscale entropy analysis of complex physiologic time series."
Physical review letters
89.6 (2002): 068102.
@@ -155,7 +155,12 @@
"Analysis of complex time series using refined composite
multiscale entropy."
Physics Letters A
- 378.20 (2014): 1369-1374.
Returns a vector of refined multiscale entropy values (MSx) and the complexity index (CI) of the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) and the following default parameters: Scales = 3, Butterworth LPF Order = 6, Butterworth LPF cutoff frequency at scale (T): Fc = 0.5/T. If the entropy function specified by Mobj is SampEn or ApEn, rMSEn updates the threshold radius of the data sequence (Xt) at each scale to 0.2std(Xt) if no r value is provided by Mobj, or r.std(Xt) if r is specified.
MSx, CI = rMSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple; Scales::Int=3,
+ 378.20 (2014): 1369-1374.
+
+[6] Azami, Hamed, Alberto Fernández, and Javier Escudero.
+ "Refined multiscale fuzzy entropy based on standard deviation
+ for biomedical signal analysis."
+ Medical & biological engineering & computing 55 (2017): 2037-2052.
Returns a vector of refined multiscale entropy values (MSx) and the complexity index (CI) of the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) and the following default parameters: Scales = 3, Butterworth LPF Order = 6, Butterworth LPF cutoff frequency at scale (T): Fc = 0.5/T. If the entropy function specified by Mobj is SampEn or ApEn, rMSEn updates the threshold radius of the data sequence (Xt) at each scale to 0.2std(Xt) if no r value is provided by Mobj, or r.std(Xt) if r is specified.
MSx, CI = rMSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple; Scales::Int=3,
F_Order::Int=6, F_Num::Float64=0.5, RadNew::Int=0, Plotx::Bool=false)
Returns a vector of refined multiscale entropy values (MSx) and the complexity index (CI) of the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) and the following 'keyword' arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default = 3)
F_Num - Numerator of Butterworth low-pass filter cutoff frequency, a scalar value in range [0 < F_Num < 1]. The cutoff frequency at each scale (T) becomes: Fc = `F_Num/T. (default: 0.5)
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is SampEn or ApEn, RadNew allows the radius threshold to be updated at each time scale (Xt). If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Standard Deviation - r*std(Xt)
[2] Variance - r*var(Xt)
@@ -189,7 +194,7 @@
"Optimal selection of threshold value ‘r’for refined multiscale
entropy."
Cardiovascular engineering and technology
- 6.4 (2015): 557-576.
Returns a vector of entropy values (MSx) calculated at each node in the hierarchical tree, the average entropy value across all nodes at each scale (Sn), and the complexity index (CI) of the hierarchical tree (i.e. sum(Sn)) for the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) over 3 temporal scales (default). The entropy values in MSx are ordered from the root node (S.00) to the Nth subnode at scale T (S.TN): i.e. S.00, S.10, S.11, S.20, S.21, S.22, S.23, S.30, S.31, S.32, S.33, S.34, S.35, S.36, S.37, S.40, ... , S.TN. The average entropy values in Sn are ordered in the same way, with the value of the root node given first: i.e. S0, S1, S2, ..., ST
MSx, Sn, CI = hMSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple;
+ 6.4 (2015): 557-576.
Returns a vector of entropy values (MSx) calculated at each node in the hierarchical tree, the average entropy value across all nodes at each scale (Sn), and the complexity index (CI) of the hierarchical tree (i.e. sum(Sn)) for the data sequence (Sig) using the parameters specified by the multiscale object (Mobj) over 3 temporal scales (default). The entropy values in MSx are ordered from the root node (S.00) to the Nth subnode at scale T (S.TN): i.e. S.00, S.10, S.11, S.20, S.21, S.22, S.23, S.30, S.31, S.32, S.33, S.34, S.35, S.36, S.37, S.40, ... , S.TN. The average entropy values in Sn are ordered in the same way, with the value of the root node given first: i.e. S0, S1, S2, ..., ST
MSx, Sn, CI = hMSEn(Sig::AbstractArray{T,1} where T<:Real, Mobj::NamedTuple;
Scales::Int=3, RadNew::Int=0, Plotx::Bool=false)
Returns a vector of entropy values (MSx) calculated at each node in the hierarchical tree, the average entropy value across all nodes at each scale (Sn), and the complexity index (CI) of the entire hierarchical tree for the data sequence (Sig) using the following 'keyword' arguments:
Arguments:
Scales - Number of temporal scales, an integer > 1 (default: 3) At each scale (T), entropy is estimated for 2^(T-1) nodes.
RadNew - Radius rescaling method, an integer in the range [1 4]. When the entropy specified by Mobj is SampEn or ApEn, RadNew allows the radius threshold to be updated at each node in the tree. If a radius value is specified by Mobj (r), this becomes the rescaling coefficient, otherwise it is set to 0.2 (default). The value of RadNew specifies one of the following methods:
[1] Standard Deviation - r*std(Xt)
[2] Variance - r*var(Xt)
@@ -199,4 +204,4 @@
[4] Median Absolute Deviation - r*med_ad(Xt,1)
Plotx - When Plotx == true, returns a plot of the average entropy value at each time scale (i.e. the multiscale entropy curve) and a hierarchical graph showing the entropy value of each node in the hierarchical tree decomposition. (default: false)
See also MSobject, MSEn, cMSEn, rMSEn, SampEn, ApEn, XMSEn
References:
[1] Ying Jiang, C-K. Peng and Yuesheng Xu,
"Hierarchical entropy analysis for biological signals."
Journal of Computational and Applied Mathematics
- 236.5 (2011): 728-742.