Entropy of a measure #
The Shannon entropy of a measure on a measurable space, following the PFR project's
ForMathlib entropy: Hm[μ] = ∑' s, negMulLog (((μ univ)⁻¹ • μ).real {s}), normalized so
that a finite measure has the entropy of its probability normalization. Mutual information is
the entropy difference Im[μ] = Hm[μ.fst] + Hm[μ.snd] - Hm[μ]; on a finite type it is the
real part of the Kullback–Leibler divergence of the joint from the product of its marginals,
hence nonnegative.
Random variables carry the same quantities through their laws: H[X ; μ] = Hm[μ.map X],
the conditional entropy H[X | Y ; μ] as the expected entropy of X under Y = y, and
I[X : Y ; μ]; on finite types the chain rule H[X, Y] = H[Y] + H[X | Y] holds and
conditioning reduces entropy.
Main definitions #
measureEntropy, notationHm[μ];measureMutualInfo, notationIm[μ]entropy, notationH[X ; μ];condEntropy, notationH[X | Y ; μ];mutualInfo, notationI[X : Y ; μ]
Main results #
measureEntropy_le_log_card: entropy is at most the log of the cardinality;measureEntropy_uniformOn: the uniform measure attains it.measureMutualInfo_eq_toReal_klDiv,measureMutualInfo_nonneg,measureMutualInfo_parallelComp_id_comp_le(data processing).chain_rule,mutualInfo_eq_entropy_sub_condEntropy,condEntropy_le_entropy.condEntropy_uniformOn_univ: on a finite population under the uniform measure, conditional entropy is a formula in counts.
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
Entropy is at most the logarithm of the cardinality of the type.
The entropy of the uniform measure on a finite set is the logarithm of its cardinality.
Mutual information of a measure on a product: the entropies of the marginals less the entropy of the joint.
Equations
Instances For
Mutual information of a measure on a product: the entropies of the marginals less the entropy of the joint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
On a finite product, mutual information is the real part of the Kullback–Leibler divergence of the joint from the product of its marginals.
Data processing: pushing the second coordinate through a Markov kernel cannot increase mutual information.
Entropy of a random variable: the entropy of its law.
Equations
- InformationTheory.entropy X μ = InformationTheory.measureEntropy (MeasureTheory.Measure.map X μ)
Instances For
Entropy of a random variable: the entropy of its law.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Conditional entropy: the expectation, under the law of Y, of the entropy of X
conditioned on Y = y.
Equations
- InformationTheory.condEntropy X Y μ = ∫ (y : T), InformationTheory.entropy X μ[|Y ⁻¹' {y}] ∂MeasureTheory.Measure.map Y μ
Instances For
Conditional entropy: the expectation, under the law of Y, of the entropy of X
conditioned on Y = y.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mutual information of two random variables.
Equations
- InformationTheory.mutualInfo X Y μ = InformationTheory.entropy X μ + InformationTheory.entropy Y μ - InformationTheory.entropy (fun (ω : Ω) => (X ω, Y ω)) μ
Instances For
Mutual information of two random variables.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The mutual information of two random variables is that of their joint law.
Chain rule: H[X, Y] = H[Y] + H[X | Y].
Conditioning reduces entropy: H[X | Y] ≤ H[X].
Empirical entropies of a finite population #
Under the uniform measure on a finite type, entropies are counts.
Conditioning the uniform measure on a finite type by a set restricts it to the set.
The conditional entropy of one attribute of a finite population given another, under the
uniform measure: each fibre of Y weighted by its share of the population, with the entropy of
the distribution of X on the fibre, all as counts.