Example 4: Cross-Distribution Entropy w/ Different Binning Methods

Import a signal of pseudorandom integers in the range [1, 8] and calculate the cross- distribution entropy with an embedding dimension of 5, a time delay (tau) of 3, and Sturges' bin selection method.

X = ExampleData("randintegers2");
XDist, _ = XDistEn(X, m = 5, tau = 3)
0.5248413652396312

Use Rice's method to determine the number of histogram bins and return the probability of each bin (Ppi).

XDist, Ppi = XDistEn(X, m = 5, tau = 3, Bins = "rice")
(0.28024570808915084, [3.5953721176540164e-5, 0.004693584691286341, 0.03679902564295558, 0.10958694214609442, 0.19781322971493293, 0.2558194625893131, 0.24212389495509928, 0.15312790653914185])