LeanMachineLearning exposition

Bandits.ucbWidth'🔗

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

ucbWidth'🔗

DefinitionBandits.ucbWidth'

The exploration bonus of the UCB algorithm, which corresponds to the width of a confidence interval.

🔗def
Bandits.ucbWidth' {K : } (c : ) (n : ) (h : (Finset.Iic n) Fin K × ) (a : Fin K) :
Bandits.ucbWidth' {K : } (c : ) (n : ) (h : (Finset.Iic n) Fin K × ) (a : Fin K) :

Code

noncomputable def ucbWidth' (c : ℝ) (n : ℕ) (h : Iic n → Fin K × ℝ) (a : Fin K) : ℝ :=
  √(2 * c * log (n + 2) / pullCount' n h a)
Body uses (1)
Used by (6)

Actions: Source · Open Issue

Dependency graph

All dependencies, transitively (1)

pullCount'🔗

DefinitionLearning.pullCount'

Number of pulls of arm a up to (and including) time n. This is the number of entries in h in which the arm is a.

🔗def
Learning.pullCount'.{u_1, u_2} {𝓐 : Type u_1} {R : Type u_2} [DecidableEq 𝓐] (n : ) (h : (Finset.Iic n) 𝓐 × R) (a : 𝓐) :
Learning.pullCount'.{u_1, u_2} {𝓐 : Type u_1} {R : Type u_2} [DecidableEq 𝓐] (n : ) (h : (Finset.Iic n) 𝓐 × R) (a : 𝓐) :

Code

noncomputable
def pullCount' (n : ℕ) (h : Iic n → 𝓐 × R) (a : 𝓐) := #{s | (h s).1 = a}
Used by (29)

Actions: Source · Open Issue