regret
defimported Lean
The regret of the Hedge algorithm is the excess cumulative loss over the best expert in hindsight: \[ R_T(\eta) \;=\; \widehat{L}_T - L^*. \]
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Real Finset BigOperators in noncomputable def regret {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) : ℝ
- Defined in
- TCSlib, `regret`
- Lean proof
- By Karim Abdel Sadek, Mark Bedaywi, from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Copyright (c) 2026 Karim Abdel Sadek and Mark Bedaywi. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.regret← regret (TCSlib/LearningTheory/Hedge/Basic.lean:129): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 3
- hedgeCumLossThe cumulative loss of the Hedge algorithm over all $T$ rounds is \[ \widehat{L}_T \;=\; \sum_{t=0}^{T-1} \widehat{\ell}_t. \]
- bestExpertLossThe best expert loss in hindsight is the minimum cumulative loss achieved by any single expert:…
- LossSeqA loss sequence $\ell$ for $N$ experts over $T$ rounds is a function $\ell : \mathrm{Fin}\,T \to \mathrm{Fin}\,N \to \mathbb{R}$,…
- Used by 4
- hedge_regret_bound_tightTight Hedge regret bound. Fix $N \ge 1$ experts and a horizon of $T$ rounds, and run the Hedge algorithm with a learning rate $\eta > 0$.…
- hedge_constructionHedge yields an approximate minimax pair. Let $G$ be a finite two-player zero-sum game with $M \ge 2$ row actions and $N \ge 1$ column…
- regret_le_of_log_potential_stepRegret from a per-step log-potential bound. Let $N \ge 1$, let $\eta > 0$, let $\ell$ be a loss sequence for $N$ experts over $T$ rounds,…
- hedge_regret_boundRegret bound for the Hedge algorithm. Fix $N \ge 1$ experts and $T$ rounds, and let $\ell$ be a valid loss sequence, so that…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Real Finset BigOperators in /-- The regret of Hedge: its cumulative expected loss minus the cumulative loss of the best expert in hindsight [CBL06, §2.1]; [FS97, §2]. -/ noncomputable def regret {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) : ℝ := hedgeCumLoss η ℓ - bestExpertLoss ℓ