The squared loss and ridge regression #
The squared loss of a linear predictor w on a point x with label y is
(⟪w, x⟫ - y)² / 2 [ShalevShwartzBenDavid2014, (13.3)]. It is convex and nonnegative in w,
and its derivative (⟪w, x⟫ - y) ⟪x, ·⟫ is ‖x‖²-Lipschitz [ShalevShwartzBenDavid2014,
Example 12.6]. Ridge regression, Tikhonov regularized minimization of the empirical squared risk
over all of E [ShalevShwartzBenDavid2014, Section 13.1.1], therefore inherits the oracle
inequality of Cslib.MachineLearning.IsRLM for smooth losses.
Examples z are described by a feature map φ : Z → E and real labels y : Z → ℝ, with
‖φ z‖ ≤ 1 and |y z| ≤ 1 as in the source.
Main definitions #
Cslib.MachineLearning.squaredLoss: the squared loss(⟪w, x⟫ - y)² / 2.
Main results #
Cslib.MachineLearning.convexOn_squaredLoss: the squared loss is convex inw.Cslib.MachineLearning.hasFDerivAt_squaredLoss: its derivative atwis(⟪w, x⟫ - y) ⟪x, ·⟫.Cslib.MachineLearning.lipschitzWith_fderiv_squaredLoss: the derivative is‖x‖²-Lipschitz [ShalevShwartzBenDavid2014, Example 12.6].Cslib.MachineLearning.IsRLM.integral_trueRisk_squaredLoss_le_add: ridge regression withr = ε / (3 B²)onm ≥ 150 B² / ε²examples has expected squared risk withinεof every predictor of norm at mostB[ShalevShwartzBenDavid2014, Theorem 13.1].
References #
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Sections 12.1.3 and 13.1.1
The squared loss (⟪w, x⟫ - y)² / 2 of the linear predictor w on the point x with
label y [ShalevShwartzBenDavid2014, (13.3)].
The squared loss is convex in the predictor.
The derivative of the squared loss at w is (⟪w, x⟫ - y) ⟪x, ·⟫.
The derivative of the squared loss is ‖x‖²-Lipschitz, so the squared loss is
‖x‖²-smooth [ShalevShwartzBenDavid2014, Example 12.6].
With ‖x‖ ≤ 1, the derivative of the squared loss is 1-Lipschitz.
Learnability by ridge regression [ShalevShwartzBenDavid2014, Theorem 13.1]: let A be a
ridge regression rule, a minimizer of the empirical squared risk plus r‖w‖² over all of E. If
every example z has feature vector ‖φ z‖ ≤ 1 and label |y z| ≤ 1, then for ε ∈ (0, 1),
B > 0, r = ε / (3 B²), m ≥ 150 B² / ε² i.i.d. examples from D and every w with
‖w‖ ≤ B, 𝔼_S [L_D(A S)] ≤ L_D(w) + ε, where L_D is the true squared risk.
The integrability hypotheses are those of
Cslib.MachineLearning.integral_trueRisk_sub_empiricalRisk; they hold automatically when Z is
finite with measurable singletons.