Documentation

CslibFrontier.MachineLearning.OnlineLearning.MistakeBound.Halving

The halving algorithm #

The halving algorithm [Littlestone1988, §3, Algorithm 1] learns a finite class C : Finset (α → Bool). It keeps the concepts of C consistent with the history (consistent C h) and predicts the label given by the majority of them, with ties broken towards false. After a mistake at least half of the consistent concepts are eliminated. On a realizable sequence some concept always survives, so the halving algorithm makes at most ⌊log₂ |C|⌋ mistakes (mistakeBound_halving_le, [Littlestone1988, §3, Theorem 1]). Consequently optimalMistakeBound C ≤ ⌊log₂ |C|⌋ [Littlestone1988, §3, Theorem 2], and by the lower bound of CslibFrontier.MachineLearning.OnlineLearning.MistakeBound.Littlestone, littlestoneDim C ≤ ⌊log₂ |C|⌋. The bounds are stated with Nat.log 2, the floor of log₂, which is equivalent to the real bound log₂ |C| for integer counts of mistakes.

Main definitions #

Main results #

References #

The concepts of the finite class C that agree with every example of the history h (Littlestone's CONSIST).

Equations
Instances For

    The halving algorithm [Littlestone1988, §3, Algorithm 1]: predict true iff more consistent concepts label the instance true than false.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Cslib.MachineLearning.OnlineLearning.MistakeBound.consistent_append_singleton {α : Type u_1} (C : Finset (α → Bool)) (h : List (α × Bool)) (x : α) (y : Bool) :
      consistent C (h ++ [(x, y)]) = {c ∈ consistent C h | c x = y}
      theorem Cslib.MachineLearning.OnlineLearning.MistakeBound.two_pow_mistakesFrom_halving_le {α : Type u_1} (C : Finset (α → Bool)) (h S : List (α × Bool)) (hS : ∃ c ∈ consistent C h, ∀ p ∈ S, c p.1 = p.2) :

      After the history h, each mistake of the halving algorithm at least halves the consistent concepts, so 2 ^ (mistakes) ≤ |consistent C h| on rounds that some consistent concept labels.

      The halving bound [Littlestone1988, §3, Theorem 1]: on a finite class C, the halving algorithm makes at most ⌊log₂ |C|⌋ mistakes.

      [Littlestone1988, §3, Theorem 2]: the optimal mistake bound of a finite class C is at most ⌊log₂ |C|⌋.

      The Littlestone dimension of a finite class C is at most ⌊log₂ |C|⌋.