JuliaDynamics / ComplexityMeasures.jl

Estimators for probabilities, entropies, and other complexity measures derived from data in the context of nonlinear dynamics and complex systems
MIT License
48 stars 11 forks source link

Extra bin when using `probabilities` vs `invariantmeasure` #338

Open kahaaga opened 7 months ago

kahaaga commented 7 months ago

CC @rusandris (moved your comment into a separate issue)

          This might be a separate issue, but since it is related, I'll mention it here.

Why one get different number of states in the outcome space when using probabilities vs. invariantmeasure?

using DynamicalSystems

henon_rule(x, p, n) = SVector{2}(1.0 - p[1]*x[1]^2 + x[2], p[2]*x[1])
henon = DeterministicIteratedMap(henon_rule, zeros(2), [1.4, 0.3])
orbit, t = trajectory(henon, 20_000; Ttr = 500)

using ComplexityMeasures
grid_size = 20
binning = RectangularBinning(grid_size)
p_cm = probabilities(ValueBinning(binning),orbit) #100 states

which gives a 100 states.

iv = invariantmeasure(orbit,binning)
P_cm,symbols = transfermatrix(iv) #101 states?? 

which in contrast gives 101 states, despite using the same binning.

Originally posted by @rusandris in https://github.com/JuliaDynamics/ComplexityMeasures.jl/issues/337#issuecomment-1847166764

kahaaga commented 7 months ago

I thought this had to do with #328, but it seems that the problem is not that, because I can still reproduce this issue on main.

rusandris commented 6 months ago

because I can still reproduce this issue on main

Yes, it's still there in the 3.0 release as well

Datseris commented 5 months ago

is this solved? wasn't this about the usage of precise?

kahaaga commented 5 months ago

This isn't solved. The issue was unrelated to the use of precise, or at least not entirely solved by utilizing precise.