Showing 2 of 32 files from the diff.
Newly tracked file
entropy/fractal.py changed.
Newly tracked file
entropy/entropy.py changed.
Other files ignored by Codecov

@@ -36,15 +36,15 @@
Loading
36 36
37 37
    References
38 38
    ----------
39 -
    .. [1] A. Petrosian, Kolmogorov complexity of finite sequences and
40 -
       recognition of different preictal EEG patterns, in , Proceedings of the
41 -
       Eighth IEEE Symposium on Computer-Based Medical Systems, 1995,
42 -
       pp. 212-217.
39 +
    * A. Petrosian, Kolmogorov complexity of finite sequences and
40 +
      recognition of different preictal EEG patterns, in , Proceedings of the
41 +
      Eighth IEEE Symposium on Computer-Based Medical Systems, 1995,
42 +
      pp. 212-217.
43 43
44 -
    .. [2] Goh, Cindy, et al. "Comparison of fractal dimension algorithms for
45 -
       the computation of EEG biomarkers for dementia." 2nd International
46 -
       Conference on Computational Intelligence in Medicine and Healthcare
47 -
       (CIMED2005). 2005.
44 +
    * Goh, Cindy, et al. "Comparison of fractal dimension algorithms for
45 +
      the computation of EEG biomarkers for dementia." 2nd International
46 +
      Conference on Computational Intelligence in Medicine and Healthcare
47 +
      (CIMED2005). 2005.
48 48
49 49
    Examples
50 50
    --------
@@ -92,14 +92,14 @@
Loading
92 92
93 93
    References
94 94
    ----------
95 -
    .. [1] Esteller, R. et al. (2001). A comparison of waveform fractal
96 -
           dimension algorithms. IEEE Transactions on Circuits and Systems I:
97 -
           Fundamental Theory and Applications, 48(2), 177-183.
95 +
    * Esteller, R. et al. (2001). A comparison of waveform fractal
96 +
      dimension algorithms. IEEE Transactions on Circuits and Systems I:
97 +
      Fundamental Theory and Applications, 48(2), 177-183.
98 98
99 -
    .. [2] Goh, Cindy, et al. "Comparison of fractal dimension algorithms for
100 -
           the computation of EEG biomarkers for dementia." 2nd International
101 -
           Conference on Computational Intelligence in Medicine and Healthcare
102 -
           (CIMED2005). 2005.
99 +
    * Goh, Cindy, et al. "Comparison of fractal dimension algorithms for
100 +
      the computation of EEG biomarkers for dementia." 2nd International
101 +
      Conference on Computational Intelligence in Medicine and Healthcare
102 +
      (CIMED2005). 2005.
103 103
104 104
    Examples
105 105
    --------
@@ -174,9 +174,9 @@
Loading
174 174
175 175
    References
176 176
    ----------
177 -
    .. [1] Higuchi, Tomoyuki. "Approach to an irregular time series on the
178 -
       basis of the fractal theory." Physica D: Nonlinear Phenomena 31.2
179 -
       (1988): 277-283.
177 +
    Higuchi, Tomoyuki. "Approach to an irregular time series on the
178 +
    basis of the fractal theory." Physica D: Nonlinear Phenomena 31.2
179 +
    (1988): 277-283.
180 180
181 181
    Examples
182 182
    --------
@@ -260,9 +260,9 @@
Loading
260 260
    deviation of the values within a window of length n changes with the window
261 261
    length factor :math:`L` in a power law:
262 262
263 -
    .. math:: \\texttt{std}(X, L * n) = L^H * \\texttt{std}(X, n)
263 +
    .. math:: \\text{std}(X, L * n) = L^H * \\text{std}(X, n)
264 264
265 -
    where :math:`\\texttt{std}(X, k)` is the standard deviation of the process
265 +
    where :math:`\\text{std}(X, k)` is the standard deviation of the process
266 266
    :math:`X` calculated over windows of size :math:`k`. In this equation,
267 267
    :math:`H` is called the Hurst parameter, which behaves indeed very similar
268 268
    to the Hurst exponent.
@@ -282,14 +282,14 @@
Loading
282 282
283 283
    References
284 284
    ----------
285 -
    .. [1] C.-K. Peng, S. V. Buldyrev, S. Havlin, M. Simons,
286 -
           H. E. Stanley, and A. L. Goldberger, “Mosaic organization of
287 -
           DNA nucleotides,” Physical Review E, vol. 49, no. 2, 1994.
288 -
289 -
    .. [2] R. Hardstone, S.-S. Poil, G. Schiavone, R. Jansen,
290 -
           V. V. Nikulin, H. D. Mansvelder, and K. Linkenkaer-Hansen,
291 -
           “Detrended fluctuation analysis: A scale-free view on neuronal
292 -
           oscillations,” Frontiers in Physiology, vol. 30, 2012.
285 +
    * C.-K. Peng, S. V. Buldyrev, S. Havlin, M. Simons,
286 +
      H. E. Stanley, and A. L. Goldberger, “Mosaic organization of
287 +
      DNA nucleotides,” Physical Review E, vol. 49, no. 2, 1994.
288 +
289 +
    * R. Hardstone, S.-S. Poil, G. Schiavone, R. Jansen,
290 +
      V. V. Nikulin, H. D. Mansvelder, and K. Linkenkaer-Hansen,
291 +
      “Detrended fluctuation analysis: A scale-free view on neuronal
292 +
      oscillations,” Frontiers in Physiology, vol. 30, 2012.
293 293
294 294
    Examples
295 295
    --------

@@ -38,21 +38,23 @@
Loading
38 38
39 39
    The permutation entropy of a signal :math:`x` is defined as:
40 40
41 -
    .. math:: H = -\\sum p(\\pi)log_2(\\pi)
41 +
    .. math:: H = -\\sum p(\\pi)\\log_2(\\pi)
42 42
43 43
    where the sum runs over all :math:`n!` permutations :math:`\\pi` of order
44 44
    :math:`n`. This is the information contained in comparing :math:`n`
45 45
    consecutive values of the time series. It is clear that
46 -
    :math:`0 ≤ H (n) ≤ log_2(n!)` where the lower bound is attained for an
46 +
    :math:`0 ≤ H (n) ≤ \\log_2(n!)` where the lower bound is attained for an
47 47
    increasing or decreasing sequence of values, and the upper bound for a
48 48
    completely random system where all :math:`n!` possible permutations appear
49 49
    with the same probability.
50 50
51 51
    The embedded matrix :math:`Y` is created by:
52 52
53 -
    .. math:: y(i)=[x_i,x_{i+delay}, ...,x_{i+(order-1) * delay}]
53 +
    .. math::
54 +
        y(i)=[x_i,x_{i+\\text{delay}}, ...,x_{i+(\\text{order}-1) *
55 +
        \\text{delay}}]
54 56
55 -
    .. math:: Y=[y(1),y(2),...,y(N-(order-1))*delay)]^T
57 +
    .. math:: Y=[y(1),y(2),...,y(N-(\\text{order}-1))*\\text{delay})]^T
56 58
57 59
    References
58 60
    ----------
@@ -126,7 +128,7 @@
Loading
126 128
    Spectral Entropy is defined to be the Shannon entropy of the power
127 129
    spectral density (PSD) of the data:
128 130
129 -
    .. math:: H(x, sf) =  -\\sum_{f=0}^{f_s/2} P(f) log_2[P(f)]
131 +
    .. math:: H(x, sf) =  -\\sum_{f=0}^{f_s/2} P(f) \\log_2[P(f)]
130 132
131 133
    Where :math:`P` is the normalised PSD, and :math:`f_s` is the sampling
132 134
    frequency.
@@ -219,9 +221,11 @@
Loading
219 221
220 222
    The embedded matrix :math:`Y` is created by:
221 223
222 -
    .. math:: y(i)=[x_i,x_{i+delay}, ...,x_{i+(order-1) * delay}]
224 +
    .. math::
225 +
        y(i)=[x_i,x_{i+\\text{delay}}, ...,x_{i+(\\text{order}-1) *
226 +
        \\text{delay}}]
223 227
224 -
    .. math:: Y=[y(1),y(2),...,y(N-(order-1))*delay)]^T
228 +
    .. math:: Y=[y(1),y(2),...,y(N-(\\text{order}-1))*\\text{delay})]^T
225 229
226 230
    Examples
227 231
    --------
@@ -351,8 +355,9 @@
Loading
351 355
        Embedding dimension. Default is 2.
352 356
    metric : str
353 357
        Name of the distance metric function used with
354 -
        :py:class:`sklearn.neighbors.KDTree`. Default is
355 -
        `Chebyshev <https://en.wikipedia.org/wiki/Chebyshev_distance>`_.
358 +
        :py:class:`sklearn.neighbors.KDTree`. Default is to use the
359 +
        `Chebyshev <https://en.wikipedia.org/wiki/Chebyshev_distance>`_
360 +
        distance.
356 361
357 362
    Returns
358 363
    -------
@@ -365,7 +370,7 @@
Loading
365 370
    regularity and the unpredictability of fluctuations over time-series data.
366 371
    Smaller values indicates that the data is more regular and predictable.
367 372
368 -
    The value of :math:`r` is set to :math:`0.2 * \\texttt{std}(x)`.
373 +
    The tolerance value (:math:`r`) is set to :math:`0.2 * \\text{std}(x)`.
369 374
370 375
    Code adapted from the `mne-features <https://mne.tools/mne-features/>`_
371 376
    package by Jean-Baptiste Schiratti and Alexandre Gramfort.
@@ -402,8 +407,9 @@
Loading
402 407
        Embedding dimension. Default is 2.
403 408
    metric : str
404 409
        Name of the distance metric function used with
405 -
        :py:class:`sklearn.neighbors.KDTree`. Default is
406 -
        `Chebyshev <https://en.wikipedia.org/wiki/Chebyshev_distance>`_.
410 +
        :py:class:`sklearn.neighbors.KDTree`. Default is to use the
411 +
        `Chebyshev <https://en.wikipedia.org/wiki/Chebyshev_distance>`_
412 +
        distance.
407 413
408 414
    Returns
409 415
    -------
@@ -420,7 +426,7 @@
Loading
420 426
421 427
    The sample entropy of a signal :math:`x` is defined as:
422 428
423 -
    .. math:: H(x, m, r) = -log\\frac{C(m + 1, r)}{C(m, r)}
429 +
    .. math:: H(x, m, r) = -\\log\\frac{C(m + 1, r)}{C(m, r)}
424 430
425 431
    where :math:`m` is the embedding dimension (= order), :math:`r` is
426 432
    the radius of the neighbourhood (default = :math:`0.2 * \\text{std}(x)`),
@@ -540,26 +546,26 @@
Loading
540 546
    Zhang and colleagues (2009) have therefore proposed the normalized LZ,
541 547
    which is defined by
542 548
543 -
    .. math:: LZn = \\frac{LZ}{(n / \\log_b{n})}
549 +
    .. math:: \\text{LZn} = \\frac{\\text{LZ}}{(n / \\log_b{n})}
544 550
545 551
    where :math:`n` is the length of the sequence and :math:`b` the number of
546 552
    unique characters in the sequence.
547 553
548 554
    References
549 555
    ----------
550 -
    .. [1] Lempel, A., & Ziv, J. (1976). On the Complexity of Finite Sequences.
551 -
           IEEE Transactions on Information Theory / Professional Technical
552 -
           Group on Information Theory, 22(1), 75–81.
553 -
           https://doi.org/10.1109/TIT.1976.1055501
556 +
    * Lempel, A., & Ziv, J. (1976). On the Complexity of Finite Sequences.
557 +
      IEEE Transactions on Information Theory / Professional Technical
558 +
      Group on Information Theory, 22(1), 75–81.
559 +
      https://doi.org/10.1109/TIT.1976.1055501
554 560
555 -
    .. [2] Zhang, Y., Hao, J., Zhou, C., & Chang, K. (2009). Normalized
556 -
           Lempel-Ziv complexity and its application in bio-sequence analysis.
557 -
           Journal of Mathematical Chemistry, 46(4), 1203–1212.
558 -
           https://doi.org/10.1007/s10910-008-9512-2
561 +
    * Zhang, Y., Hao, J., Zhou, C., & Chang, K. (2009). Normalized
562 +
      Lempel-Ziv complexity and its application in bio-sequence analysis.
563 +
      Journal of Mathematical Chemistry, 46(4), 1203–1212.
564 +
      https://doi.org/10.1007/s10910-008-9512-2
559 565
560 -
    .. [3] https://en.wikipedia.org/wiki/Lempel-Ziv_complexity
566 +
    * https://en.wikipedia.org/wiki/Lempel-Ziv_complexity
561 567
562 -
    .. [4] https://github.com/Naereen/Lempel-Ziv_Complexity
568 +
    * https://github.com/Naereen/Lempel-Ziv_Complexity
563 569
564 570
    Examples
565 571
    --------
@@ -580,7 +586,7 @@
Loading
580 586
    >>> lziv_complexity(s, normalize=True)
581 587
    1.5
582 588
583 -
    Note that this function also works with characters and words:
589 +
    This function also works with characters and words:
584 590
585 591
    >>> s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
586 592
    >>> lziv_complexity(s), lziv_complexity(s, normalize=True)
Files Coverage
entropy 99.72%
Project Totals (6 files) 99.72%
Notifications are pending CI completion. Waiting for GitHub's status webhook to queue notifications. Push notifications now.
59.2
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
59.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
59.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
1
codecov:
2
  token: 8051dd9b-dddd-43d8-b731-9b21e58a4d78
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading