Example 11: Multivariate Dispersion Entropy
Import a vector of 4096 uniformly distributed random integers in range [1 8] and convert it to a multivariate set of 4 sequences with 1024 samples each.
X = ExampleData("randintegers");
Data = reshape(X, 1024, 4);
1024×4 Matrix{Float64}:
7.0 6.0 5.0 8.0
1.0 2.0 5.0 3.0
6.0 5.0 4.0 6.0
6.0 7.0 3.0 3.0
1.0 7.0 7.0 8.0
8.0 3.0 7.0 3.0
5.0 7.0 3.0 8.0
2.0 1.0 2.0 3.0
5.0 1.0 3.0 7.0
6.0 7.0 2.0 6.0
⋮
7.0 4.0 2.0 7.0
8.0 1.0 2.0 1.0
1.0 2.0 8.0 1.0
2.0 5.0 3.0 8.0
1.0 4.0 1.0 3.0
5.0 7.0 6.0 1.0
4.0 7.0 4.0 5.0
1.0 5.0 6.0 8.0
7.0 5.0 1.0 8.0
Calculate the multivariate dispersion entropy and reverse dispersion entropy for embedding dimensions (m) = [1,1,2,3], using a 7-symbol transform.
MDisp, RDE = MvDispEn(Data, m = [1,1,2,3], c = 7);
6.922734508722953
0.0009856206548534644
Perform the same calculation but normalize the output entropy estimate w.r.t the number of unique dispersion patterns
MDisp, RDE = MvDispEn(Data, m = [1,1,2,3], c = 7, Norm = true);
0.5082259698140852
0.0009856218516602513
Compare the results above ($Methodx == 'v1'$) with those obtained using the mvDE method ($Methodx=='v2'$), returning estimates for each value from 1, ..., max(m)
MDisp, RDE = MvDispEn(Data, m = [1,1,2,3], c = 7, Norm = true, Methodx = "v2")
3-element Vector{Float64}:
0.9543959541913541
0.9407485371546896
0.9301233396966886
3-element Vector{Float64}:
0.026759488075314832
0.008053236671745904
0.0020161358982542705