InformationTheory

InformationTheory.Shannon.KLDivContinuous

source

KL divergence in vector form and its continuity #

klDivSumForm_ofVec p q := ∑ a, p a * (log (p a) - log (q a)) and its continuity in p under the Pi topology on α → ℝ (finite α).

Main definitions #

Main statements #

noncomputable def

InformationTheory.Shannon.klDivSumForm_ofVec

source
{α : Type u_1} [Fintype α] (p q : α) :

KL divergence in finite-alphabet vector form taking α → ℝ inputs: klDivSumForm_ofVec p q := ∑ a, p a * (log (p a) - log (q a)).

This variant is designed for continuity arguments in the Pi topology on α → ℝ, complementing the Measure α-based klDiv.

Equations
Instances For
    Used by
      theorem

      InformationTheory.Shannon.klDivSumForm_ofVec_continuous

      source
      {α : Type u_1} [Fintype α] (q : α) (_hq_pos : ∀ (a : α), 0 < q a) :
      Continuous fun (p : α) => klDivSumForm_ofVec p q

      p ↦ klDivSumForm_ofVec p q is continuous when q a > 0 for all a.

      Used by
        theorem

        InformationTheory.Shannon.klDivIndex_eq_ofVec

        source
        {α : Type u_1} [Fintype α] [MeasurableSpace α] (c : α) (n : ) (Q : MeasureTheory.Measure α) :
        klDivIndex c n Q = klDivSumForm_ofVec (fun (a : α) => (c a) / n) fun (a : α) => Q.real {a}
        Used by