Entropy of a measure #
The Shannon entropy of a measure, following the PFR project's ForMathlib entropy, is
Hm[μ] = ∑' s, negMulLog (((μ univ)⁻¹ • μ).real {s}), normalized so that a finite measure has the
entropy of its probability normalization. On a finite type it
falls short of log (card S) by the divergence from
the uniform measure, so only that measure attains the bound. The
mutual information of a measure on a product is Im[μ] = Hm[μ.fst] + Hm[μ.snd] - Hm[μ], on a finite
type the divergence of the joint from its marginals' product,
which a kernel on the second coordinate cannot
increase.
Implementation notes #
[UPSTREAM] candidate: mathlib has no Shannon entropy of a measure and no mutual information.
References #
- [CT06], chapter 2.
- The PFR project,
PFR/ForMathlib/Entropy/Measure.lean.
Entropy of a measure. The measure is normalized by (μ Set.univ)⁻¹, so that a finite
measure has the entropy of its probability normalization and every other measure has entropy
0; on a probability measure simp removes the normalization.
Equations
- InformationTheory.measureEntropy μ = ∑' (s : S), (((μ Set.univ)⁻¹ • μ).real {s}).negMulLog
Instances For
Entropy of a measure. The measure is normalized by (μ Set.univ)⁻¹, so that a finite
measure has the entropy of its probability normalization and every other measure has entropy
0; on a probability measure simp removes the normalization.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The entropy of a probability measure carried by a finite set is a sum over that set.
Entropy is invariant under an injective recoding of the outcomes.
The entropy of the uniform measure on a finite set is the logarithm of its cardinality.
A probability measure on a finite type has zero entropy iff it is a Dirac mass.
The divergence and the entropy add up to the cross-entropy, the expected surprisal under μ
of the atoms as ν weighs them.
The entropy of a probability measure on a finite type falls short of the logarithm of the cardinality by the divergence from the uniform measure.
Entropy is at most the logarithm of the cardinality of the type.
A probability measure on a finite type has entropy log (card S) only if it is uniform.
The mutual information of a measure on a product is the sum of the entropies of its marginals less the entropy of the joint.
Equations
Instances For
The mutual information of a measure on a product is the sum of the entropies of its marginals less the entropy of the joint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mutual information is symmetric in the two coordinates.
On a finite product, mutual information is the real part of the Kullback–Leibler divergence of the joint from the product of its marginals.
A product measure carries no mutual information.
Data processing. Pushing the second coordinate through a Markov kernel cannot increase mutual information.