Question: II. QUESTION 2: ABOUT STOCHASTIC GRADIENT DESCENT [60 POINTS] Consider the following four data points a = 1, a2 2, a3 = 3, a4

II. QUESTION 2: ABOUT STOCHASTIC GRADIENT DESCENT [60 POINTS] Consider the following

II. QUESTION 2: ABOUT STOCHASTIC GRADIENT DESCENT [60 POINTS] Consider the following four data points a = 1, a2 2, a3 = 3, a4 = 4. Assume we want to train a model which should output 0 for odd inputs and 1 for even inputs. Therefore, the labels of these data points are = 0, l2 = 1, l3 = 0, 14 = 1. We use the mean squared error loss for this model: fi(2) = 1 4 1 (aix li). i=1 (2) A. Full gradient descent [20 points] With a fixed learning rate n = 0.01, solve two iterations of the gradient descent algorithm and find x* after these two iterations. Start with the initial point x = 1. B. Stochastic gradient descent [20 points] With a fixed learning rate n = 0.01, solve two iterations of the stochastic gradient descent algorithm and find x* after these two iterations. For the first and second iterations of SGD, let the sampled data points be the second point (i = 2) and the first point (i 1), respectively. Start with the initial point x = 1. = 2 C. Mini-batch stochastic gradient descent [20 points] = With a fixed learning rate n 0.01, solve two iterations of the mini-batch stochastic gradient descent algorithm and find x* after these two iterations. For the first and second iterations of mini-batch SGD, let the sampled batches of data points be {i = 1, i = 2} and {i = 3, i = 4}, respectively. Start with the initial point x = 1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mechanical Engineering Questions!