Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) Consider minimizing the function f(w)=w - 5w+3 using gradient descent (graph of f shown below). Say the current value of w is equal

(a) Consider minimizing the function f(w)=w - 5w+3 using gradient descent (graph of f shown below). Say the In this question we will analyze SGD for a simple (meaning p = 1) linear regression problem. We have n = 2,

(a) Consider minimizing the function f(w)=w - 5w+3 using gradient descent (graph of f shown below). Say the current value of w is equal to 5. What is the derivative of f at this point? (show your work) If our step size a = -0.1, what is the new value of w after this single gradient descent update? (b) Say we are part way through SGD for a linear regression problem with p= 1. The current weights are woand w=-. Next we are analyzing (z. y.)= (-1,2). If a = 0.1, what are the new weights after considering this point? Show work for full credit: Wo Explain your result geometrically (include a sketch of the model and a discussion of cost): (c) Assuming n training examples, p features, and T iterations needed for convergence, how long does it take to compute the stochastic gradient descent solution (i.e. w) for linear regression? Answer using big-O notation and briefly explain your reasoning for full credit. In this question we will analyze SGD for a simple (meaning p = 1) linear regression problem. We have n = 2, where (ri, y1)= (2, 1) and (x2, 32)= (1, -1) (plotted below), and wish to fit a linear model to this data. (Note the different scales on z and y below.) . (X2.Y2) = (1,-1) (d) Before we begin SGD, we will set wo - w0. At this point, what is the numerical value of the cost function for linear regression? Our cost function for linear regression is: J(w) == (X,Y) = (2,1) n (hw (x) - y) (e) For SGD we will use a = 1 (learning rate). Using (21, 31), compute the SGD updates (show your work) to find new values for wo and w. Use these new values to draw the current linear model on the plot above and label it M (model 1).

Step by Step Solution

3.43 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

a To find the derivative of the function f w w 25 w 3 at a point where w 5 we can differentiate it with respect to w f w 2 w 5 Now lets calculate the derivative at w 5 f 52551055 So the derivative of ... 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_2

Step: 3

blur-text-image_3

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

Microeconomics An Intuitive Approach with Calculus

Authors: Thomas Nechyba

1st edition

538453257, 978-0538453257

More Books

Students also viewed these Programming questions

Question

How does financial reporting help to improve corporate governance?

Answered: 1 week ago

Question

2x 2x 2x3 4 2X2 2 x 5x 2x3 1 8 x x 4x 11 2 + 2X2 = 4

Answered: 1 week ago

Question

What is one of the skills required for independent learning?Explain

Answered: 1 week ago