Showing regularized Hinge Loss is convex or concave

1.3k Views Asked by At

I'm asked to show either the convexity or concavity of the following function: $$ L(w) = max\{0, 1-yw^Tx\} + |w|_2 $$ where $x, y$ are some constants.

My attempt is as follows:

We know every norm of a vector is convex and sum of convex functions is convex. Therefore, $L(w)$ is convex iff $L'(w) = max\{0, 1-yw^{T}x\}$ is convex.

To show convexity of $L'(w)$, I consider the cases separately:

  1. 0 is convex as constant functions are convex
  2. Linear functions are convex, and thus $1-yw^{T}x$ is convex because it's a linear function of $w$.
  3. From 1 and 2, $L'(w)$ is convex because max of 2 convex functions is convex. Thus, $L(w)$ is convex too.

Is my reasoning and conclusion correct or am I overlooking something?