Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Quantum Mechanics

Authors: J.J Sakurai

Revised Edition

9781108499996, 201539292, 978-0201539295

More Books

Students also viewed these Mechanical Engineering questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago