LeanMachineLearning exposition

Bandits.gap_eq_zero_of_regret_eq_zero🔗

This page has the declaration's own card below, then its dependency graph, then a card for each dependency (type dependencies first, then the rest of the transitive closure). For a theorem, the graph and the dependency cards only follow its statement's dependencies (its proof is replaced by sorry, so what it proves doesn't depend on how); for everything else, both the type and the body/value are followed, since their content is part of what later declarations build on.

Minimal Lean file

gap_eq_zero_of_regret_eq_zero🔗

LemmaBandits.gap_eq_zero_of_regret_eq_zero

No docstring.

🔗theorem
Bandits.gap_eq_zero_of_regret_eq_zero.{u_1, u_2} {𝓐 : Type u_1} {Ω : Type u_2} {m𝓐 : MeasurableSpace 𝓐} {ν : ProbabilityTheory.Kernel 𝓐 } {A : Ω 𝓐} {ω : Ω} {t : } [Finite 𝓐] (hr : regret ν A t ω = 0) {s : } (hs : s < t) : gap ν (A s ω) = 0
Bandits.gap_eq_zero_of_regret_eq_zero.{u_1, u_2} {𝓐 : Type u_1} {Ω : Type u_2} {m𝓐 : MeasurableSpace 𝓐} {ν : ProbabilityTheory.Kernel 𝓐 } {A : Ω 𝓐} {ω : Ω} {t : } [Finite 𝓐] (hr : regret ν A t ω = 0) {s : } (hs : s < t) : gap ν (A s ω) = 0

Code

lemma gap_eq_zero_of_regret_eq_zero [Finite 𝓐] (hr : regret ν A t ω = 0) {s : ℕ} (hs : s < t) :
    gap ν (A s ω) = 0
Type uses (2)
Body uses (2)

Actions: Source · Open Issue

Proof
by
  rw [regret_eq_sum_gap] at hr
  exact (sum_eq_zero_iff_of_nonneg fun _ _ ↦ gap_nonneg).1 hr s (mem_range.2 hs)

Dependency graph

Type dependencies (2)

regret🔗

DefinitionBandits.regret

Regret of a sequence of pulls k : ℕ → 𝓐 at time t for the reward kernel ν ; Kernel 𝓐 ℝ.

🔗def
Bandits.regret.{u_1, u_2} {𝓐 : Type u_1} {Ω : Type u_2} {m𝓐 : MeasurableSpace 𝓐} (ν : ProbabilityTheory.Kernel 𝓐 ) (A : Ω 𝓐) (t : ) (ω : Ω) :
Bandits.regret.{u_1, u_2} {𝓐 : Type u_1} {Ω : Type u_2} {m𝓐 : MeasurableSpace 𝓐} (ν : ProbabilityTheory.Kernel 𝓐 ) (A : Ω 𝓐) (t : ) (ω : Ω) :

Code

noncomputable
def regret (ν : Kernel 𝓐 ℝ) (A : ℕ → Ω → 𝓐) (t : ℕ) (ω : Ω) : ℝ :=
  t * (⨆ a, (ν a)[id]) - ∑ s ∈ range t, (ν (A s ω))[id]
Used by (11)

Actions: Source · Open Issue

gap🔗

DefinitionBandits.gap

Gap of an action a: difference between the highest mean of the actions and the mean of a.

🔗def
Bandits.gap.{u_1} {𝓐 : Type u_1} {m𝓐 : MeasurableSpace 𝓐} (ν : ProbabilityTheory.Kernel 𝓐 ) (a : 𝓐) :
Bandits.gap.{u_1} {𝓐 : Type u_1} {m𝓐 : MeasurableSpace 𝓐} (ν : ProbabilityTheory.Kernel 𝓐 ) (a : 𝓐) :

Code

noncomputable
def gap (ν : Kernel 𝓐 ℝ) (a : 𝓐) : ℝ := (⨆ i, (ν i)[id]) - (ν a)[id]
Used by (27)

Actions: Source · Open Issue