Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started