Documentation

CslibFrontier.MachineLearning.Rademacher.LinearL1

Rademacher complexity of ℓ₁-bounded linear predictors #

For a feature map φ : Z → Fin n → ℝ, l1LinearPredictors φ B is the class of linear predictors z ↦ w ⬝ᵥ φ z whose weight vector has ℓ₁ norm ∑ j, |w j| ≤ B. If every coordinate of every sample feature is at most R in absolute value, its empirical Rademacher complexity on m points is at most B R √(2 log (2 n) / m) [ShalevShwartzBenDavid2014, Lemma 26.11].

The proof is the textbook one. For a fixed sign vector σ, Hölder's inequality bounds the correlation of w with σ by B maxⱼ |cⱼ|, where cⱼ is the correlation of coordinate j of the features with σ; this maximum is attained by one of the 2 n vertices ± B eⱼ of the ℓ₁ ball. Massart's lemma (rademacherAverage_le_mul_sqrt) bounds the Rademacher average of these 2 n vectors, whose entries are at most B R in absolute value.

Compared with the ℓ₂ bound of CslibFrontier.MachineLearning.Rademacher.Linear, the ℓ₁ constraint on w is stronger and the ℓ∞ assumption on the features weaker, at the price of a √(log n) factor. The population form assumes Z finite, as the Rademacher API does.

Main definitions #

Main results #

References #

def Cslib.MachineLearning.l1LinearPredictors {Z : Type u_1} {n : ℕ} (φ : Z → Fin n → ℝ) (B : ℝ) :
Set (Z → ℝ)

The class of ℓ₁-bounded linear predictors z ↦ w ⬝ᵥ φ z with ∑ j, |w j| ≤ B, for a feature map φ : Z → Fin n → ℝ.

theorem Cslib.MachineLearning.mem_l1LinearPredictors {Z : Type u_1} {n : ℕ} {φ : Z → Fin n → ℝ} {B : ℝ} {h : Z → ℝ} :
h ∈ l1LinearPredictors φ B ↔ ∃ (w : Fin n → ℝ), ∑ j : Fin n, |w j| ≤ B ∧ (fun (z : Z) => w ⬝ᵥ φ z) = h
theorem Cslib.MachineLearning.empiricalRademacherComplexity_l1LinearPredictors_le {Z : Type u_1} {n : ℕ} (φ : Z → Fin n → ℝ) {B R : ℝ} (hB : 0 ≤ B) {m : ℕ} (S : Fin m → Z) (hS : ∀ (i : Fin m) (j : Fin n), |φ (S i) j| ≤ R) :

Rademacher complexity of ℓ₁-bounded linear predictors [ShalevShwartzBenDavid2014, Lemma 26.11]: for B ≥ 0 and a sample whose features have coordinates at most R in absolute value, the empirical Rademacher complexity of l1LinearPredictors φ B is at most B R √(2 log (2 n) / m).

theorem Cslib.MachineLearning.rademacherComplexity_l1LinearPredictors_le {Z : Type u_1} {n : ℕ} [Fintype Z] (D : PMF Z) (φ : Z → Fin n → ℝ) {B R : ℝ} (hB : 0 ≤ B) (hφ : ∀ (z : Z) (j : Fin n), |φ z j| ≤ R) (m : ℕ) :
rademacherComplexity D (l1LinearPredictors φ B) m ≤ B * R * √(2 * Real.log (2 * ↑n) / ↑m)

The population form of empiricalRademacherComplexity_l1LinearPredictors_le on a finite domain whose features have coordinates at most R in absolute value.