pyhctsa.operations.entropy.approximate_entropy¶
-
pyhctsa.operations.entropy.approximate_entropy(x, mnom=
1, rth=0.2, tau=1)¶ Approximate entropy (ApEn) of a time series.
Computes \(\mathrm{ApEn}(m, r)\), with delay vectors \((x_i, x_{i+\tau}, \ldots, x_{i+(m-1)\tau})\).
For details, see the PhysioNet documentation: https://physionet.org/physiotools/apen/
References
- Parameters:¶
- x : array-like¶
Input time series.
- mnom : int, optional¶
Embedding dimension \(m\). Default is 1.0
- rth : float, optional¶
Similarity threshold \(r\). Default is 0.2.
- tau : int or str, optional¶
The time delay between the elements of a pattern: an integer, or a rule understood by
get_tau()('ac': first zero-crossing of the autocorrelation function;'ac1e': floor of its first 1/e crossing;'mi': the smaller of the first Kraskov automutual-information minimum and the'ac1e'delay). The default of 1 uses consecutive samples.
- Returns:¶
Approximate entropy value. NaN if the delay cannot be determined, or if the series is too short for the pattern length and delay (fewer than two delay vectors).
- Return type:¶
float