Multiscale Entropies

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, DispEn, EnofEn, FuzzEn, GridEn, IncrEn, K2En, PermEn, PhasEn, SampEn, SlopEn, SpecEn, SyDyEn).

NOTE:

Multiscale cross-entropy functions have two positional arguments:

  1. the time series signal, Sig (a vector > 10 elements),
  2. the multiscale entropy object, Mobj.
EntropyHub._MSobject.MSobjectFunction
Mobj = MSobject()

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:

Base Entropies:

-----------------
`ApEn`      - Approximate Entropy  

`SampEn`    - Sample Entropy   

`FuzzEn`    - Fuzzy Entropy    

`K2En`      - Kolmogorov Entropy   

`PermEn`    - Permutation Entropy	 

`CondEn`    - Conditional Entropy	   

`DistEn`    - Distribution Entropy	    

`DispEn`    - Dispersion Entropy	    

`SpecEn`    - Spectral Entropy   

`SyDyEn`    - Symbolic Dynamic Entropy	  

`IncrEn`    - Increment Entropy	    

`CoSiEn`    - Cosine Similarity Entropy	

`PhasEn`    - Phase Entropy	    

`SlopEn`    - Slope Entropy       

`BubbEn`    - Bubble Entropy   

`GridEn`    - Gridded Distribution Entropy  

`EnofEn`    - Entropy of Entropy	

`AttnEn`    - Attention Entropy

Cross Entropies:

------------------
`XApEn`     - Cross-Approximate Entropy    

`XSampEn`   - Cross-Sample Entropy  

`XFuzzEn`   - Cross-Fuzzy Entropy   

`XK2En`     - Cross-Kolmogorov Entropy  

`XPermEn`   - Cross-Permutation Entropy   

`XCondEn`   - Cross-Conditional Entropy    

`XDistEn`   - Cross-Distribution Entropy    

`XSpecEn`   - Cross-Spectral Entropy

See also MSEn, XMSEn, rMSEn, cMSEn, hMSEn, rXMSEn, cXMSEn, hXMSEn

source

The following functions use the multiscale entropy object shown above.

EntropyHub._MSEn.MSEnFunction
 MSx, CI = MSEn(Sig, Mobj)

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} [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) 

          [3]    Mean Absolute Deviation     - r*mean_ad(Xt) 

          [4]    Median Absolute Deviation   - r*med_ad(Xt)

Plotx - When Plotx == true, returns a plot of the entropy value at each time scale (i.e. the multiscale entropy curve) [default: false]

For further info on these graining procedures see the EntropyHub guide.

See also MSobject, rMSEn, cMSEn, 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.

 [2] Vadim V. Nikulin, and Tom Brismar,
         "Comment on “Multiscale entropy analysis of complex physiologic
         time series”." 
         Physical review letters 
         92.8 (2004): 089803.

 [3] Madalena Costa, Ary L. Goldberger, and C-K. Peng. 
         "Costa, Goldberger, and Peng reply." 
         Physical Review Letters
         92.8 (2004): 089804.

 [4] Madalena Costa, Ary L. Goldberger and C-K. Peng,
         "Multiscale entropy analysis of biological signals." 
         Physical review E 
         71.2 (2005): 021906.

 [5] Ranjit A. Thuraisingham and Georg A. Gottwald,
         "On multiscale entropy analysis for physiological data."
         Physica A: Statistical Mechanics and its Applications
         366 (2006): 323-332.

 [6] Meng Hu and Hualou Liang,
         "Intrinsic mode entropy based on multivariate empirical mode
         decomposition and its application to neural data analysis." 
         Cognitive neurodynamics
         5.3 (2011): 277-284.

 [7] Anne Humeau-Heurtier 
         "The multiscale entropy algorithm and its variants: A review." 
         Entropy 
         17.5 (2015): 3110-3123.

 [8] Jianbo Gao, et al.,
         "Multiscale entropy analysis of biological signals: a 
         fundamental bi-scaling law." 
         Frontiers in computational neuroscience 
         9 (2015): 64.

 [9]  Paolo Castiglioni, et al.,
         "Multiscale Sample Entropy of cardiovascular signals: Does the
         choice between fixed-or varying-tolerance among scales 
         influence its evaluation and interpretation?." 
         Entropy
         19.11 (2017): 590.

 [10] Tuan D Pham,
         "Time-shift multiscale entropy analysis of physiological signals." 
         Entropy 
         19.6 (2017): 257.

 [11] Hamed Azami and Javier Escudero,
         "Coarse-graining approaches in univariate multiscale sample 
         and dispersion entropy." 
         Entropy 20.2 (2018): 138.
source
EntropyHub._cMSEn.cMSEnFunction
MSx, CI = cMSEn(Sig, Mobj)

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,
    "Multiscale entropy analysis of complex physiologic time series."
    Physical review letters
    89.6 (2002): 068102.

[2] Vadim V. Nikulin, and Tom Brismar,
    "Comment on “Multiscale entropy analysis of complex physiologic
    time series”." 
    Physical review letters 
    92.8 (2004): 089803.

[3] Madalena Costa, Ary L. Goldberger, and C-K. Peng. 
    "Costa, Goldberger, and Peng reply." 
    Physical Review Letters
    92.8 (2004): 089804.

 [4] Shuen-De Wu, et al.,
    "Time series analysis using composite multiscale entropy." 
    Entropy 
    15.3 (2013): 1069-1084.

[5] Shuen-De Wu, et al.,
    "Analysis of complex time series using refined composite 
    multiscale entropy." 
    Physics Letters A 
    378.20 (2014): 1369-1374.
source
EntropyHub._rMSEn.rMSEnFunction
MSx, CI = rMSEn(Sig, Mobj)

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_Order - Butterworth low-pass filter order, a positive integer (default: 6)

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) 

         [3]    Mean Absolute Deviation     - r*mean_ad(Xt) 

         [4]    Median Absolute Deviation   - r*med_ad(Xt)

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, MSEn, cMSEn, 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.

[2] Vadim V. Nikulin, and Tom Brismar,
    "Comment on “Multiscale entropy analysis of complex physiologic
    time series”." 
    Physical review letters 
    92.8 (2004): 089803.

[3] Madalena Costa, Ary L. Goldberger, and C-K. Peng. 
    "Costa, Goldberger, and Peng reply." 
    Physical Review Letters
    92.8 (2004): 089804.

[4] José Fernando Valencia, et al.,
    "Refined multiscale entropy: Application to 24-h holter 
    recordings of heart period variability in healthy and aortic 
    stenosis subjects." 
    IEEE Transactions on Biomedical Engineering 
    56.9 (2009): 2202-2213.

[5] Puneeta Marwaha and Ramesh Kumar Sunkaria,
    "Optimal selection of threshold value ‘r’for refined multiscale
    entropy." 
    Cardiovascular engineering and technology 
    6.4 (2015): 557-576.
source
EntropyHub._hMSEn.hMSEnFunction
MSx, Sn, CI = hMSEn(Sig, Mobj)

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)

         [3]    Mean Absolute Deviation     - r*mean_ad(Xt)

         [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.
source