The hinge loss and Soft-SVM #
The hinge loss of a linear predictor w on a point x with label y is
max 0 (1 - y ⟪w, x⟫) [ShalevShwartzBenDavid2014, Section 12.3]. It is convex
in w and |y| ‖x‖-Lipschitz [ShalevShwartzBenDavid2014, Claim 15.6], so Soft-SVM, Tikhonov
regularized minimization of the empirical hinge risk [ShalevShwartzBenDavid2014, (15.6)], inherits
the stability and oracle inequality of Cslib.MachineLearning.IsRLM.
Examples z are described by a feature map φ : Z → E and real labels y : Z → ℝ. The source
uses labels ±1 and points of norm at most ρ; here |y z| ≤ 1 and ‖φ z‖ ≤ ρ for every z.
Main definitions #
Cslib.MachineLearning.hingeLoss: the hinge lossmax 0 (1 - y ⟪w, x⟫).
Main results #
Cslib.MachineLearning.convexOn_hingeLoss: the hinge loss is convex inw.Cslib.MachineLearning.lipschitzWith_hingeLoss: the hinge loss is|y| ‖x‖-Lipschitz inw[ShalevShwartzBenDavid2014, Claim 15.6].Cslib.MachineLearning.IsRLM.integral_trueRisk_hingeLoss_le: the Soft-SVM oracle inequality𝔼_S [L_D(A S)] ≤ L_D(u) + r‖u‖² + 2ρ² / (r m)[ShalevShwartzBenDavid2014, Corollary 15.7].
References #
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Section 12.3 and Chapter 15
The hinge loss max 0 (1 - y ⟪w, x⟫) of the linear predictor w on the point x with
label y [ShalevShwartzBenDavid2014, Section 12.3].
The hinge loss vanishes when the margin y ⟪w, x⟫ is at least 1.
The hinge loss is convex in the predictor.
The hinge loss is |y| ‖x‖-Lipschitz in the predictor [ShalevShwartzBenDavid2014,
Claim 15.6].
With |y| ≤ 1 and ‖x‖ ≤ ρ, the hinge loss is ρ-Lipschitz in the predictor.
The Soft-SVM oracle inequality [ShalevShwartzBenDavid2014, Corollary 15.7]: let A be a
Soft-SVM rule, a minimizer of the empirical hinge risk plus r‖w‖² with r > 0 over all of E.
If every example z has label |y z| ≤ 1 and feature vector ‖φ z‖ ≤ ρ, then for m > 0
i.i.d. examples from D and every u, 𝔼_S [L_D(A S)] ≤ L_D(u) + r‖u‖² + 2ρ² / (r m), where
L_D is the true hinge risk.
The integrability hypotheses are those of
Cslib.MachineLearning.integral_trueRisk_sub_empiricalRisk; they hold automatically when Z is
finite with measurable singletons.