Base Entropies

Functions for estimating the entropy of a single univariate time series.

The following functions also form the base entropy method used by Multiscale functions -> MSEn, cMSEn, rMSEn, hMSEn

EntropyHub._ApEn.ApEnFunction
Ap, Phi = ApEn(Sig)

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.
source
EntropyHub._SampEn.SampEnFunction
Samp, A, B = SampEn(Sig)

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).

[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.
source
EntropyHub._FuzzEn.FuzzEnFunction
Fuzz, Ps1, Ps2 = FuzzEn(Sig)

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

Fuzz, Ps1, Ps2 = FuzzEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Union{Real,Tuple{Real,Real}}=(.2,2), Fx::String="default", Logx::Real=exp(1))

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)
        modsampen:      r(1) = divisor of the exponential argument
                        r(2) = value subtracted from argument (pre-division)
        gudermannian:   r  = a scalar whose value is the numerator of
                            argument to gudermannian function:
                            GD(x) = atan(tanh(`r`/x))
        triangular:     r = a scalar whose value is the threshold (corner point) of the triangular function.
        trapezoidal1:   r = a scalar whose value corresponds to the upper (2r) and lower (r) corner points of the trapezoid.
        trapezoidal2:   r(1) = a value corresponding to the upper corner point of the trapezoid.
                        r(2) = a value corresponding to the lower corner point of the trapezoid.
        z_shaped:       r = a scalar whose value corresponds to the upper (2r) and lower (r) corner points of the z-shape.
        bell:           r(1) = divisor of the distance value
                        r(2) = exponent of generalized bell-shaped function
        gaussian:       r = a scalar whose value scales the slope of the Gaussian curve.
        constgaussian:  r = a scalar whose value defines the lower threshod and shape of the Gaussian curve.                    
        [DEPRICATED] linear:       r  = an integer value. When r = 0, the
                            argument of the exponential function is 
                            normalised between [0 1]. When r = 1,
                            the minimuum value of the exponential 
                            argument is set to 0.

Logx - Logarithm base, a positive scalar [default: natural]

For further information on keyword arguments, see the EntropyHub guide.

See also SampEn, ApEn, PermEn, DispEn, XFuzzEn, FuzzEn2D, MSEn

References:

[1] Weiting Chen, et al.
    "Characterization of surface EMG signal based on fuzzy entropy."
    IEEE Transactions on neural systems and rehabilitation engineering
    15.2 (2007): 266-272.

[2] Hong-Bo Xie, Wei-Xing He, and Hui Liu
    "Measuring time series regularity using nonlinear
    similarity-based sample entropy."
    Physics Letters A
    372.48 (2008): 7140-7146.

[3] Hamed Azami, et al.
    "Fuzzy Entropy Metrics for the Analysis of Biomedical Signals: 
    Assessment and Comparison"
    IEEE Access
    7 (2019): 104833-104847
source
EntropyHub._K2En.K2EnFunction
K2, Ci = K2En(Sig)

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
source
EntropyHub._PermEn.PermEnFunction
Perm, Pnorm, cPE = PermEn(Sig)

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.

Perm, Pnorm, cPE = PermEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, Typex::String="none", tpx::Union{Real,Nothing}=nothing, Logx::Real=2, Norm::Bool=false)

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
      is calculated w.r.t. log(tpx^m)

Typex - Permutation entropy variation, one of the following: {`"none", "uniquant", "finegrain", "modified", "ampaware", "weighted", "edge", "phase"} See the EntropyHub guide for more info on PermEn variations.

tpx - Tuning parameter for associated permutation entropy variation.

      [uniquant]  'tpx' is the L parameter, an integer > 1 (default = 4).           
      [finegrain] 'tpx' is the alpha parameter, a positive scalar (default = 1)
      [ampaware]  'tpx' is the A parameter, a value in range [0 1] (default = 0.5)
      [edge]      'tpx' is the r sensitivity parameter, a scalar > 0 (default = 1)
      [phase]     'tpx' unwraps the instantaneous phase (angle of analytic signal) when tpx==1 (default = 0)
      See the EntropyHub guide for more info on PermEn variations.

See also XPermEn, MSEn, XMSEn, SampEn, ApEn, CondEn

References:

[1] Christoph Bandt and Bernd Pompe, 
        "Permutation entropy: A natural complexity measure for time series." 
        Physical Review Letters,
        88.17 (2002): 174102.

[2] Xiao-Feng Liu, and Wang Yue,
        "Fine-grained permutation entropy as a measure of natural 
        complexity for time series." 
        Chinese Physics B 
        18.7 (2009): 2690.

[3] Chunhua Bian, et al.,
        "Modified permutation-entropy analysis of heartbeat dynamics."
        Physical Review E
        85.2 (2012) : 021906

[4] Bilal Fadlallah, et al.,
        "Weighted-permutation entropy: A complexity measure for time 
        series incorporating amplitude information." 
        Physical Review E 
        87.2 (2013): 022911.

[5] Hamed Azami and Javier Escudero,
        "Amplitude-aware permutation entropy: Illustration in spike 
        detection and signal segmentation." 
        Computer methods and programs in biomedicine,
        128 (2016): 40-51.

[6] Zhiqiang Huo, et al.,
        "Edge Permutation Entropy: An Improved Entropy Measure for 
        Time-Series Analysis," 
        45th Annual Conference of the IEEE Industrial Electronics Soc,
        (2019), 5998-6003

[7] Zhe Chen, et al. 
        "Improved permutation entropy for measuring complexity of time
        series under noisy condition." 
        Complexity 
        1403829 (2019).

[8] Maik Riedl, Andreas Müller, and Niels Wessel,
        "Practical considerations of permutation entropy." 
        The European Physical Journal Special Topics 
        222.2 (2013): 249-262.

[9] Kang Huan, Xiaofeng Zhang, and Guangbin Zhang,
        "Phase permutation entropy: A complexity measure for nonlinear time 
        series incorporating phase information." 
        Physica A: Statistical Mechanics and its Applications 
        568 (2021): 125686.
source
EntropyHub._CondEn.CondEnFunction
Cond, SEw, SEz = CondEn(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.

Cond, SEw, SEz = CondEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, c::Int=6, Logx::Real=exp(1), Norm::Bool=false)

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.
source
EntropyHub._DistEn.DistEnFunction
Dist, Ppi = DistEn(Sig)

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.
source
EntropyHub._SpecEn.SpecEnFunction
Spec, BandEn = SpecEn(Sig)

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.

Spec, BandEn = SpecEn(Sig::AbstractArray{T,1} where T<:Real; N::Int=1 + (2*size(Sig,1)), Freqs::Tuple{Real,Real}=(0,1), Logx::Real=exp(1), Norm::Bool=true)

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 
    irregular motion of Hamiltonian systems." 
    Journal of Physics A: Mathematical and General 
    12.11 (1979): 2053.

[2] Tsuyoshi Inouye, et al.,
    "Quantification of EEG irregularity by use of the entropy of 
    the power spectrum." 
    Electroencephalography and clinical neurophysiology 
    79.3 (1991): 204-210.
source
EntropyHub._DispEn.DispEnFunction
Dispx, RDE = DispEn(Sig)

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)

Dispx, RDE = DispEn(Sig::AbstractArray{T,1} where T<:Real; c::Int=3, m::Int=2, tau::Int=1, Typex::String="ncdf", Logx::Real=exp(1), Fluct::Bool=false, Norm::Bool=false, rho::Real=1)

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.

[2] Hamed Azami and Javier Escudero,
    "Amplitude-and fluctuation-based dispersion entropy." 
    Entropy 
    20.3 (2018): 210.

[3] Li Yuxing, Xiang Gao and Long Wang,
    "Reverse dispersion entropy: A new complexity measure for 
    sensor signal." 
    Sensors 
    19.23 (2019): 5203.

[4] Wenlong Fu, et al.,
    "Fault diagnosis for rolling bearings based on fine-sorted 
    dispersion entropy and SVM optimized with mutation SCA-PSO."
    Entropy
    21.4 (2019): 404.
source
EntropyHub._SyDyEn.SyDyEnFunction
SyDy, Zt = SyDyEn(Sig)

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)

SyDy, Zt = SyDyEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, c::Int=3, Typex::String="MEP", Logx::Real=exp(1), Norm::Bool=true)

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 
    selection." 
    Mechanical Systems and Signal Processing 
    91 (2017): 295-312. 

[2] Jian Wang, et al.,
    "Fault feature extraction for multiple electrical faults of 
    aviation electro-mechanical actuator based on symbolic dynamics
    entropy." 
    IEEE International Conference on Signal Processing, 
    Communications and Computing (ICSPCC), 2015.

[3] Venkatesh Rajagopalan and Asok Ray,
    "Symbolic time series analysis via wavelet-based partitioning."
    Signal processing 
    86.11 (2006): 3309-3320.
source
EntropyHub._IncrEn.IncrEnFunction
Incr = IncrEn(Sig)

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
      [true]   normalises w.r.t embedding dimension (m-1).

See also PermEn, SyDyEn, MSEn

References:

[1] Xiaofeng Liu, et al.,
    "Increment entropy as a measure of complexity for time series."
    Entropy
    18.1 (2016): 22.1.

***   "Correction on Liu, X.; Jiang, A.; Xu, N.; Xue, J. - Increment 
    Entropy as a Measure of Complexity for Time Series,
    Entropy 2016, 18, 22." 
    Entropy 
    18.4 (2016): 133.

[2] Xiaofeng Liu, et al.,
    "Appropriate use of the increment entropy for 
    electrophysiological time series." 
    Computers in biology and medicine 
    95 (2018): 13-23.
source
EntropyHub._CoSiEn.CoSiEnFunction
CoSi, Bm = CoSiEn(Sig)

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,

CoSi, Bm = CoSiEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Real=.1, Logx::Real=2, Norm::Int=0)

Returns the cosine similarity entropy (CoSi) 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 - Angular threshold, a value in range [0 < r < 1]

Logx - Logarithm base, a positive scalar (enter 0 for natural log)

Norm - Normalisation of Sig, one of the following integers:

    [0]  no normalisation - default
    [1]  normalises `Sig` by removing median(`Sig`)
    [2]  normalises `Sig` by removing mean(`Sig`)
    [3]  normalises `Sig` w.r.t. SD(`Sig`)
    [4]  normalises `Sig` values to range [-1 1]

See also PhasEn, SlopEn, GridEn, MSEn, cMSEn

References:

[1] Theerasak Chanwimalueang and Danilo Mandic,
    "Cosine similarity entropy: Self-correlation-based complexity
    analysis of dynamical systems."
    Entropy 
    19.12 (2017): 652.
source
EntropyHub._PhasEn.PhasEnFunction
Phas = PhasEn(Sig)

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`)

Plotx - When Plotx == true, returns Poincaré plot (default: false)

See also SampEn, ApEn, GridEn, MSEn, SlopEn, CoSiEn, BubbEn

References:

[1] Ashish Rohila and Ambalika Sharma,
    "Phase entropy: a new complexity measure for heart rate
    variability." 
    Physiological measurement
    40.10 (2019): 105006.
source
EntropyHub._SlopEn.SlopEnFunction
Slop = SlopEn(Sig)

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.
source
EntropyHub._BubbEn.BubbEnFunction
Bubb, H = BubbEn(Sig)

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.
source
EntropyHub._GridEn.GridEnFunction
GDE, GDR, _ = GridEn(Sig)

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

GDE, GDR, ..., = GridEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=3, tau::Int=1, Logx::Real=exp(1), Plotx::Bool=false)

Returns the gridded distribution entropy (GDE) estimated from the data sequence (Sig) using the specified 'keyword' arguments:

Arguments:

m - Grid coarse-grain (m x m sectors), an integer > 1

tau - Time Delay, a positive integer

Logx - Logarithm base, a positive scalar

Plotx - When Plotx == true, returns gridded Poicaré plot and a bivariate histogram of the grid point distribution (default: false)

See also PhasEn, CoSiEn, SlopEn, BubbEn, MSEn

References:

[1] Chang Yan, et al.,
        "Novel gridded descriptors of poincaré plot for analyzing 
        heartbeat interval time-series." 
        Computers in biology and medicine 
        109 (2019): 280-289.

[2] Chang Yan, et al. 
        "Area asymmetry of heart rate variability signal." 
        Biomedical engineering online 
        16.1 (2017): 1-14.

[3] Alberto Porta, et al.,
        "Temporal asymmetries of short-term heart period variability 
        are linked to autonomic regulation." 
        American Journal of Physiology-Regulatory, Integrative and 
        Comparative Physiology 
        295.2 (2008): R550-R557.

[4] C.K. Karmakar, A.H. Khandoker and M. Palaniswami,
        "Phase asymmetry of heart rate variability signal." 
        Physiological measurement 
        36.2 (2015): 303.
source
EntropyHub._EnofEn.EnofEnFunction
EoE, AvEn, S2 = EnofEn(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))

EoE, AvEn, S2 = EnofEn(Sig::AbstractArray{T,1} where T<:Real; tau::Int=10, S::Int=10, Xrange::Tuple{Real,REal}, Logx::Real=exp(1))

Returns the entropy of entropy (EoE) estimated from the data sequence (Sig) using the specified 'keyword' arguments:

Arguments:

tau - Window length, an integer > 1

S - Number of slices (s1,s2), a two-element tuple of integers > 2

Xrange - The min and max heartbeat interval, a two-element tuple where X[1] <= X[2]

Logx - Logarithm base, a positive scalar

See also SampEn, MSEn, ApEn

References:

[1] Chang Francis Hsu, et al.,
    "Entropy of entropy: Measurement of dynamical complexity for
    biological systems." 
    Entropy 
    19.10 (2017): 550.
source
EntropyHub._AttnEn.AttnEnFunction
Av4, (Hxx,Hnn,Hxn,Hnx) = AttnEn(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)

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)
source
EntropyHub._RangEn.RangEnFunction
Rangx, A, B = RangEn(Sig)

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::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Real=0.2, Methodx::String="SampEn", Logx::Real=exp(1))

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.
    
[2] 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
source
EntropyHub._DivEn.DivEnFunction
Div, CDEn, Bm = DivEn(Sig)

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,

Div, CDEn, Bm = DivEn(Sig::AbstractArray{T,1} where T<:Real; m::Int=2, tau::Int=1, r::Int=5, Logx::Real=exp(1))

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," 
    IEEE Transactions on Industrial Informatics,
    vol. 17, no. 8, pp. 5419-5429, Aug. 2021
    
[2] Y. Wang, M. Liu, Y. Guo, F. Shu, C. Chen and W. Chen, 
    "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
source