Two Weeks, Two Loss Surfaces

Introduction to OptimizationMedium+20 XP+20

Two Weeks, Two Loss Surfaces

A café owner predicts each day's iced-coffee sales yyy (in dozens) from the afternoon temperature xxx (in units of 10 ∘C10\,^\circ\text{C}10∘C) with a straight line

y^=wx+b\hat{y} = w x + by^​=wx+b

and scores the line with the mean squared error over the nnn days of a week:

L(w,b)=1n∑i=1n(wxi+b−yi)2L(w, b) = \frac{1}{n}\sum_{i=1}^{n} \left(w x_i + b - y_i\right)^2L(w,b)=n1​i=1∑n​(wxi​+b−yi​)2

She fits the line separately on two weeks of data, four days each:

temperature xxxsales yyy
Week 11, 3, 4, 41,\ 3,\ 4,\ 41, 3, 4, 45, 9, 10, 125,\ 9,\ 10,\ 125, 9, 10, 12
Week 2 (steady weather)3, 3, 3, 33,\ 3,\ 3,\ 33, 3, 3, 38, 11, 9, 128,\ 11,\ 9,\ 128, 11, 9, 12

To judge the shape of each loss surface, build its curvature table of second partial derivatives (also called the Hessian):

[LwwLwbLbwLbb]\begin{bmatrix} L_{ww} & L_{wb} \\ L_{bw} & L_{bb} \end{bmatrix}[Lww​Lbw​​Lwb​Lbb​​]

With two inputs, the one-variable rule "f′′(x)≥0f''(x) \ge 0f′′(x)≥0 everywhere" becomes a test on this table:

  • Convex if, at every point, Lww≥0L_{ww} \ge 0Lww​≥0, Lbb≥0L_{bb} \ge 0Lbb​≥0 and LwwLbb−Lwb2≥0L_{ww}L_{bb} - L_{wb}^2 \ge 0Lww​Lbb​−Lwb2​≥0.
  • Strictly convex if, at every point, Lww>0L_{ww} > 0Lww​>0 and LwwLbb−Lwb2>0L_{ww}L_{bb} - L_{wb}^2 > 0Lww​Lbb​−Lwb2​>0. The surface then bends upward in every direction, and a surface built from squares like this one has exactly one lowest point.

Which statement about the two loss surfaces is correct?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.