Documentation

Linglib.Core.InformationTheory.Hellinger

Hellinger distance on a finite type #

The Bhattacharyya coefficient ∑ a, √(μ {a} · ν {a}) of two measures on a finite type, the squared Hellinger distance 1 - BC, and the Hellinger distance √(1 - BC). For probability measures the coefficient lies in [0, 1], so the Hellinger distance is bounded by 1 where the Kullback–Leibler divergence may be infinite. Mathlib has no Hellinger distance; [UPSTREAM] candidate for Mathlib/InformationTheory/.

noncomputable def InformationTheory.bhattacharyyaCoeff {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) :

The Bhattacharyya coefficient ∑ a, √(μ {a} · ν {a}).

Equations
Instances For
    noncomputable def InformationTheory.hellingerDistSq {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) :

    The squared Hellinger distance 1 - BC(μ, ν).

    Equations
    Instances For
      noncomputable def InformationTheory.hellingerDist {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) :

      The Hellinger distance √(1 - BC(μ, ν)).

      Equations
      Instances For
        theorem InformationTheory.bhattacharyyaCoeff_nonneg {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) :
        theorem InformationTheory.hellingerDistSq_le_one {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) :
        theorem InformationTheory.hellingerDist_le_one {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) :
        theorem InformationTheory.bhattacharyyaCoeff_le_one {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) [MeasurableSingletonClass α] [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.IsProbabilityMeasure ν] :

        For probability measures the Bhattacharyya coefficient is at most 1, by the arithmetic–geometric mean inequality on each atom.

        theorem InformationTheory.hellingerDistSq_nonneg {α : Type u_1} [MeasurableSpace α] [Fintype α] (μ ν : MeasureTheory.Measure α) [MeasurableSingletonClass α] [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.IsProbabilityMeasure ν] :
        theorem InformationTheory.bhattacharyyaCoeff_dirac_left {α : Type u_1} [MeasurableSpace α] [Fintype α] (ν : MeasureTheory.Measure α) [MeasurableSingletonClass α] (a : α) :
        bhattacharyyaCoeff (MeasureTheory.Measure.dirac a) ν = (ν.real {a})

        The Bhattacharyya coefficient against a Dirac mass is the square root of the other measure's mass at the atom.

        theorem InformationTheory.hellingerDist_dirac_left {α : Type u_1} [MeasurableSpace α] [Fintype α] (ν : MeasureTheory.Measure α) [MeasurableSingletonClass α] (a : α) :
        hellingerDist (MeasureTheory.Measure.dirac a) ν = (1 - (ν.real {a}))

        The Hellinger distance from a Dirac mass is determined by the other measure's mass at the atom: 1 where that mass vanishes.