The Loss After One Step Downhill

Correlation & RegressionHard+30 XP+30

The Loss After One Step Downhill

Gradient descent is used to fit a line y^=b0+b1x\hat{y} = b_0 + b_1 xy^​=b0​+b1​x to the four points

(1, 2),(2, 3),(3, 5),(4, 6)(1,\,2), \quad (2,\,3), \quad (3,\,5), \quad (4,\,6)(1,2),(2,3),(3,5),(4,6)

The loss is the mean squared error

J(b0,b1)=1n∑i=1n(b0+b1xi−yi)2J(b_0, b_1) = \frac{1}{n}\sum_{i=1}^{n}\left(b_0 + b_1 x_i - y_i\right)^2J(b0​,b1​)=n1​∑i=1n​(b0​+b1​xi​−yi​)2

and the parameters are updated with

b0:=b0−η 2n∑(y^i−yi),b1:=b1−η 2n∑(y^i−yi) xib_0 := b_0 - \eta \,\frac{2}{n} \sum (\hat{y}_i - y_i), \qquad b_1 := b_1 - \eta \,\frac{2}{n} \sum (\hat{y}_i - y_i)\,x_ib0​:=b0​−ηn2​∑(y^​i​−yi​),b1​:=b1​−ηn2​∑(y^​i​−yi​)xi​

Training starts at b0=0.5b_0 = 0.5b0​=0.5 and b1=1.0b_1 = 1.0b1​=1.0 with learning rate η=0.1\eta = 0.1η=0.1. Both parameters are updated simultaneously, each gradient computed from the predictions at the starting values.

Exactly one step is taken. What is the value of the loss JJJ at the new parameters?

Round your answer to 2 decimal places.

Walking Downhill, One Step at a Time

Step size stays fixed at α = 0.30 here.
-8-4048
new x = old x − α × slope
5.950 = 7.000 − 0.30 × 3.500
Steps taken: 0 · Loss now: 14.250

The slope tells you which way is uphill, so you subtract it to head downhill. Near the edge the ground is steep and the steps are long. As the ground flattens the slope shrinks, so the steps shrink with it, and the walk eases into the bottom instead of shooting past it.

Hints

Solve it to unlock the solution

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