LeanMachineLearning

Bandits.ClippedUCB.ucbπŸ”—

Definition

Clipped upper confidence bound used in the regret analysis of Thompson sampling.

πŸ”—def
Bandits.ClippedUCB.ucb.{u_1} {K : β„•} {Ξ© : Type u_1} (A : β„• β†’ Ξ© β†’ Fin K) (R : β„• β†’ Ξ© β†’ ℝ) (l u Οƒ2 Ξ΄ : ℝ) (a : Fin K) (n : β„•) (Ο‰ : Ξ©) : ℝ
Bandits.ClippedUCB.ucb.{u_1} {K : β„•} {Ξ© : Type u_1} (A : β„• β†’ Ξ© β†’ Fin K) (R : β„• β†’ Ξ© β†’ ℝ) (l u Οƒ2 Ξ΄ : ℝ) (a : Fin K) (n : β„•) (Ο‰ : Ξ©) : ℝ

Code

noncomputable def ucb (A : β„• β†’ Ξ© β†’ Fin K) (R : β„• β†’ Ξ© β†’ ℝ) (l u Οƒ2 Ξ΄ : ℝ) (a : Fin K) (n : β„•) (Ο‰ : Ξ©) : ℝ := if pullCount A a n Ο‰ = 0 then u else max l (min u (empMean A R a n Ο‰ + √(2 * Οƒ2 * Real.log (1 / Ξ΄) / (pullCount A a n Ο‰))))

Actions: Source Β· Open Issue

Meaning last changed in v4.34.0-rc2-14-gf86702d (2026-08-25), the 3th recorded change.

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file Β· open it in the Lean web editor.

Dependency graph

Audit surface: 3 project declarations, 44 external constants

βœ“ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.