shannon_concentration: Shannon-entropy-based concentration of evidence contributions

View source: R/belief_trajectory.R

shannon_concentrationR Documentation

Shannon-entropy-based concentration of evidence contributions

Description

Computes a concentration measure based on the Shannon entropy of the normalized per-step contributions. Robustness alternative to concentration_index and herfindahl_index.

Usage

shannon_concentration(weights)

Arguments

weights

Numeric vector of per-step contributions.

Details

Defined as

C_S(w) = 1 - \frac{H(p)}{\log T}, \qquad p_k = \frac{|w_k|}{\sum_j |w_j|},

where H(p) = -\sum_k p_k \log p_k is the natural-log Shannon entropy of the normalized contributions. This is the complement of the normalized Shannon entropy: uniform weights give C_S = 0, single-step dominance gives C_S \to 1.

Value

Numeric scalar in [0, 1]. Returns 0 for uniform weights and approaches 1 for single-step dominance. Returns 0 if all weights are zero.

See Also

concentration_index, herfindahl_index.

Examples

shannon_concentration(rep(1, 10))           # 0
shannon_concentration(c(10, rep(0.01, 9)))  # ~0.95


mispitools documentation built on Aug. 26, 2026, 1:08 a.m.