1
1
# This file defines and exports some convenience definition of entropies
2
2
# for commonly used names in the literature. They aren't actually new entropies
3
3
# as discussed extensively in the documentation.
4
+ export entropy_permutation, entropy_spatial_permutation, entropy_wavelet
4
5
5
- function entropy_permutation (args... )
6
+ """
7
+ entropy_permutation(x; τ = 1, m = 3, base = MathConstants.e)
6
8
9
+ Compute the permutation entropy of order `m` with delay/lag `τ`.
10
+ This function is just a convenience call to:
11
+ ```julia
12
+ est = SymbolicPermutation(; m, τ)
13
+ entropy_renyi(x, est; base, q = 1)
14
+ ```
15
+ See [`SymbolicPermutation`](@ref) for more info.
16
+ Similarly, one can use `SymbolicWeightedPermutation` or `SymbolicAmplitudeAwarePermutation`
17
+ for the weighted/amplitude-aware versions.
18
+ """
19
+ function entropy_permutation (x; τ = 1 , m = 3 , base = MathConstants. e)
20
+ est = SymbolicPermutation (; m, τ)
21
+ entropy_renyi (x, est; base, q = 1 )
7
22
end
8
23
9
- function entropy_spatial_permutation (args... )
24
+ """
25
+ entropy_spatial_permutation(x, stencil, periodic = true; kwargs...)
10
26
27
+ Compute the spatial permutation entropy of `x` given the `stencil`.
28
+ Here `x` must be a matrix or higher dimensional `Array` containing spatial data.
29
+ This function is just a convenience call to:
30
+ ```julia
31
+ est = SpatialSymbolicPermutation(stencil, x, periodic)
32
+ entropy_renyi(x, est; kwargs..., q = 1)
33
+ ```
34
+ See [`SpatialSymbolicPermutation`](@ref) for more info, or how to encode stencils.
35
+ """
36
+ function entropy_spatial_permutation (x, stencil, periodic = true ; kwargs... )
37
+ est = SpatialSymbolicPermutation (stencil, x, periodic)
38
+ entropy_renyi (x, est; kwargs... , q = 1 )
11
39
end
12
40
13
41
"""
@@ -18,7 +46,7 @@ Compute the wavelet entropy. This function is just a convenience call to:
18
46
est = WaveletOverlap(wavelet)
19
47
entropy_renyi(x, est; base, q = 1)
20
48
```
21
- See [`WaveletOverlap`](@ref) for more.
49
+ See [`WaveletOverlap`](@ref) for more info .
22
50
"""
23
51
function entropy_wavelet (x; wavelet = Wavelets. WT. Daubechies {12} (), base = MathConstants. e)
24
52
est = WaveletOverlap (wavelet)
0 commit comments