Skip to content

Discussion on invariant measure estimation #337

@rusandris

Description

@rusandris

Let's say I'm interested in getting the transfer matrix and the invariant measure in case of a time series.

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)

As the docs say we can get an estimate for the invariant measure by using probabilities:

using ComplexityMeasures
grid_size=20
grid_along_1d = range(-2,2;length=grid_size)
grids = (grid_along_1d,grid_along_1d)
binning = FixedRectangularBinning(grids)

p_est = probabilities(RelativeAmount(),ValueBinning(binning),orbit)  #estimate by counting visitations

According to the docs, using probabilities with TransferOperator gives the invariant measure (the stationary distribution over the states) instead of just an estimate from counting:

ρ_to = probabilities(TransferOperator(binning),orbit)

If I understand correctly, another way of doing this is with invariantmeasure:

iv = invariantmeasure(orbit,binning)

ρ_to and iv.ρ are not exactly the same, although very similar:

iv.ρ[1] == ρ_to[1] #false
iv.ρ[1]  ρ_to[1] #true

Is this difference because of the random initialization of the distribution?

If yes, the docs are not really clear on this issue (at least for me).

The TransferOperator docs say "In practice, the invariant measure ρ is computed using invariantmeasure, which also approximates the transfer matrix. The invariant distribution is initialized as a length-N random distribution which is then applied to P".

But then the invariantmeasure docs say that the iterative process starts from the estimated distribution from the counting, not random:
"Estimate an invariant measure over the points in x based on binning the data into rectangular boxes dictated by the binning, then approximate the transfer (Perron-Frobenius) operator over the bins. "

Wouldn't it be more efficient if the invariant distribution was initialized as p_est , not a random vector?

Another curiosity: is there a way to get the P transfer matrix without calling invariantmeasure first?

Let me know if I misunderstood anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions