Multiscale Cross-Entropies

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:

  1. the first data seuqence, Sig1 (a vector of >10 elements),
  2. the second data seuqence, Sig2 (a vector of > 10 elements),
  3. the multiscale entropy object, Mobj -> see MSobject
EntropyHub._XMSEn.XMSEnFunction
MSx, CI = XMSEn(Sig1, Sig2, Mobj)

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) 

         [2]    Pooled Variance                    - r*var(Xt) 

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

         [4]    Total 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, MSEn, cXMSEn, rXMSEn, hXMSEn, XSampEn, XApEn, XFuzzEn

References:

[1] Rui Yan, Zhuo Yang, and Tao Zhang,
    "Multiscale cross entropy: a novel algorithm for analyzing two
    time series." 
    5th International Conference on Natural Computation. 
    Vol. 1, pp: 411-413 IEEE, 2009.

[2] Madalena Costa, Ary Goldberger, and C-K. Peng,
    "Multiscale entropy analysis of complex physiologic time series."
    Physical review letters
    89.6 (2002): 068102.

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

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

[5] Antoine Jamin, et al,
    "A novel multiscale cross-entropy method applied to navigation 
    data acquired with a bike simulator." 
    41st annual international conference of the IEEE EMBC
    IEEE, 2019.

[6] Antoine Jamin and Anne Humeau-Heurtier. 
    "(Multiscale) Cross-Entropy Methods: A Review." 
    Entropy 
    22.1 (2020): 45.
source
EntropyHub._cXMSEn.cXMSEnFunction
MSx, CI = cXMSEn(Sig1, Sig2, Mobj)

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)

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

         [4]    Total Median Absolute Deviation    - r*med_ad(Ykj,1)

Refined - Refined-composite XMSEn method. When Refined == true and the entropy function specified by Mobj is XSampEn or XFuzzEn, cXMSEn returns the refined-composite multiscale entropy (rcXMSEn). (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, XMSEn, rXMSEn, hXMSEn, XSampEn, XApEn, cMSEn

References:

[1] Rui Yan, Zhuo Yang, and Tao Zhang,
    "Multiscale cross entropy: a novel algorithm for analyzing two
    time series." 
    5th International Conference on Natural Computation. 
    Vol. 1, pp: 411-413 IEEE, 2009.

[2] Yi Yin, Pengjian Shang, and Guochen Feng, 
    "Modified multiscale cross-sample entropy for complex time 
    series."
    Applied Mathematics and Computation 
    289 (2016): 98-110.

[3] Madalena Costa, Ary Goldberger, and C-K. Peng,
    "Multiscale entropy analysis of complex physiologic time series."
    Physical review letters
    89.6 (2002): 068102.

[4] Antoine Jamin, et al,
    "A novel multiscale cross-entropy method applied to navigation 
    data acquired with a bike simulator." 
    41st annual international conference of the IEEE EMBC
    IEEE, 2019.

[5] Antoine Jamin and Anne Humeau-Heurtier. 
    "(Multiscale) Cross-Entropy Methods: A Review." 
    Entropy 
    22.1 (2020): 45.

[6] Shuen-De Wu, et al.,
    "Time series analysis using composite multiscale entropy." 
    Entropy 
    15.3 (2013): 1069-1084.
source
EntropyHub._rXMSEn.rXMSEnFunction
MSx, CI = rXMSEn(Sig1, Sig2, Mobj)

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

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

         [4]    Total 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, XMSEn, cXMSEn, hXMSEn, XSampEn, XApEn, MSEn

References:

[1] Matthew W. Flood (2021), 
    "EntropyHub - An open source toolkit for entropic time series analysis"
    PLoS ONE 16(11):e0295448, 
    DOI:  10.1371/journal.pone.0259448
    https://www.EntropyHub.xyz

[2]   Rui Yan, Zhuo Yang, and Tao Zhang,
    "Multiscale cross entropy: a novel algorithm for analyzing two
    time series." 
    5th International Conference on Natural Computation. 
    Vol. 1, pp: 411-413 IEEE, 2009.

[3] 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.

[4] 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.

[5] Yi Yin, Pengjian Shang, and Guochen Feng, 
    "Modified multiscale cross-sample entropy for complex time 
    series."
    Applied Mathematics and Computation 
    289 (2016): 98-110.

[6] Antoine Jamin, et al,
    "A novel multiscale cross-entropy method applied to navigation 
    data acquired with a bike simulator." 
    41st annual international conference of the IEEE EMBC
    IEEE, 2019.

[7] Antoine Jamin and Anne Humeau-Heurtier. 
    "(Multiscale) Cross-Entropy Methods: A Review." 
    Entropy 
    22.1 (2020): 45.
source
EntropyHub._hXMSEn.hXMSEnFunction
MSx, Sn, CI = hXMSEn(Sig1, Sig2, Mobj)

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) 

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

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

Plotx - When Plotx == true, returns a plot of the average cross-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, XMSEn, rXMSEn, cXMSEn, XSampEn, XApEn, hMSEn

References:

[1] Matthew W. Flood (2021), 
    "EntropyHub - An open source toolkit for entropic time series analysis"
    PLoS ONE 16(11):e0295448, 
    DOI:  10.1371/journal.pone.0259448
    https://www.EntropyHub.xyz

[2]   Rui Yan, Zhuo Yang, and Tao Zhang,
    "Multiscale cross entropy: a novel algorithm for analyzing two
    time series." 
    5th International Conference on Natural Computation. 
    Vol. 1, pp: 411-413 IEEE, 2009.

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