Question: [ Linear Regression ] ( 8 pts ) Suppose we have a weight vector w = [ w 1 , w 2 ] T with

[Linear Regression](8 pts)
Suppose we have a weight vector w=[w1,w2]T with input vectors xninR2 and
ynin{0,1}(y=wx=w1x1+w2x2). Let us initialize all the weights to be 0. Also,
suppose we have N=2 examples in our dataset:
{:[-1,-1]T,y2=1). Work out on paper the process of training an l2 regularized (=1)
linear regression model with batch gradient descent (learning rate =1) on the above
dataset for two epochs (steps).
(a)(1 pts) What is the value of the loss function at the beginning?
(b)(4 pts) What is the final state of the trained weight vector after 2 steps, and the
corresponding value of the loss function? (Hint: derive the partial derivative of
the loss function with respect to weights, and calculate their values after each
step)
L=1Ni=1N(yi-wxi)2+||w||2
(c)(3 pts) Derive the formula of the closed-form solution for ridge regression. (Hint:
first write out the loss function in matrix form).
[ Linear Regression ] ( 8 pts ) Suppose we have a

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 Programming Questions!