Expand description
Pillar: III. PACR field: Γ.
Statistical complexity (C_μ) and entropy rate (h_μ) computation from a
CssrResult, plus bootstrap confidence intervals.
§Definitions
Given the inferred causal states with stationary distribution π:
C_μ = H[π] = -Σ_i π_i log₂ π_i (statistical complexity, bits)
h_μ = Σ_i π_i H[P(·|i)] = Σ_i π_i (-Σ_a P(a|i) log₂ P(a|i)) (entropy rate, bits/sym)Bootstrap CIs use B=200 parametric resamples of the state emission counts.
Functions§
- bootstrap_
ci - Parametric bootstrap confidence intervals for (
C_μ,h_μ). - compute_
metrics - Compute (
C_μ,h_μ) from causal states and their stationary distribution. - counts_
to_ probs - Convert a count vector to probability vector. Returns uniform if all zero.
- entropy
- Shannon entropy of a probability vector (in bits). Zeros are skipped.
- stationary_
distribution - Estimate the stationary distribution of causal states empirically from the
symbol sequence. Each position (past position
max_depth) is assigned to the state of its longest matching history prefix.