One Epoch, Two Mini-Batches

Variants of Gradient DescentEasy+10 XP+10

One Epoch, Two Mini-Batches

A one-parameter model y^=wx\hat{y} = w xy^​=wx (no intercept) is trained on six examples:

xix_ixi​123456
yiy_iyi​35891214

Training uses mini-batch gradient descent with a batch size of 333. For a mini-batch BBB containing mmm examples, the loss and its gradient are

JB(w)=1m∑i∈B(wxi−yi)2,dJBdw=2m∑i∈B(wxi−yi)xiJ_B(w) = \frac{1}{m}\sum_{i \in B}\left(w x_i - y_i\right)^2, \qquad \frac{dJ_B}{dw} = \frac{2}{m}\sum_{i \in B}\left(w x_i - y_i\right)x_iJB​(w)=m1​∑i∈B​(wxi​−yi​)2,dwdJB​​=m2​∑i∈B​(wxi​−yi​)xi​

One epoch consists of two updates taken in order:

  • update 1 uses the mini-batch {(1,3),  (2,5),  (3,8)}\{(1,3),\;(2,5),\;(3,8)\}{(1,3),(2,5),(3,8)};
  • update 2 uses the mini-batch {(4,9),  (5,12),  (6,14)}\{(4,9),\;(5,12),\;(6,14)\}{(4,9),(5,12),(6,14)}, and its gradient is evaluated at the weight that update 1 has already produced — not at the starting weight.

Training starts at w=2w = 2w=2 with learning rate η=0.02\eta = 0.02η=0.02.

What is the value of www after one complete epoch?

Round your answer to 2 decimal places.

Hints

Solve it to unlock the solution

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