View source: R/transition_entropy.R
| transition_entropy | R Documentation |
Computes per-state branching entropy, stationary entropy, and the chain-level entropy rate of a Markov transition process. The entropy rate is the Shannon-McMillan-Breiman per-step uncertainty of trajectories under the stationary distribution; it is the canonical information-theoretic summary of a transition matrix.
transition_entropy(x, base = 2, normalize = TRUE)
x |
A |
base |
Numeric. Logarithm base. |
normalize |
Logical. If |
Convention 0 \log 0 := 0 is applied, so absorbing or
deterministic rows contribute zero per-row entropy. The chain need not be
irreducible; \pi is computed from the eigendecomposition of
P^\top as elsewhere in the package. For non-ergodic chains the
returned \pi is one stationary distribution among many - interpret
with the help of chain_structure.
The relation h(P) \leq H(\pi) holds with equality iff successive
states are independent. The deficit H(\pi) - h(P) is reported as
redundancy - a measure of how much memory the chain has at order 1.
An object of class "net_transition_entropy" with:
Named numeric vector, length n. Per-state
branching entropy H(P_{i\cdot}) = -\sum_j P_{ij} \log P_{ij}.
Named numeric vector. row_entropy
divided by the ceiling \log_b n (in [0, 1]; all zeros
when n = 1).
Named numeric vector. Stationary distribution
\pi.
Scalar. H(\pi) = -\sum_i \pi_i \log \pi_i
- the entropy of \pi treated as an i.i.d. distribution. Upper
bound on the entropy rate.
Scalar. stationary_entropy
divided by the ceiling \log_b n.
Scalar. h(P) = \sum_i \pi_i H(P_{i\cdot}) -
the Shannon-McMillan-Breiman entropy rate.
Scalar. entropy_rate divided by the
ceiling \log_b n.
Scalar. H(\pi) - h(P), the entropy deficit
attributable to serial dependence; zero for an i.i.d. chain (rows of
P all equal \pi).
Scalar. The relative redundancy
(H(\pi) - h(P)) / H(\pi) (the fraction of the stationary
entropy removed by order-1 memory), not
redundancy divided by \log_b n; 0 when
H(\pi) = 0.
Scalar. The normalising ceiling \log_b n.
Logarithm base used.
Character vector of state names.
Cover, T.M. & Thomas, J.A. (2006). Elements of Information Theory, 2nd ed., chapter 4. Wiley.
Shannon, C.E. (1948). A mathematical theory of communication. Bell System Technical Journal, 27, 379-423.
markov_stability, passage_time,
markov_order_test, chain_structure
net <- build_network(as.data.frame(trajectories), method = "relative")
te <- transition_entropy(net)
print(te)
summary(te)
plot(te)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.