Question: In this problem, we would like to use the gradient descent to calculate the parameters $W$ for the parabola. The loss function $ mathcal
In this problem, we would like to use the gradient descent to calculate the parameters $W$ for the parabola.
The loss function $mathcalLW$ now contains two parts: A squared $L$ norm and a $L$ norm.
A coefficient $alpha$ is used to control the ratio of these two norms:
$$
beginaligned
mathcalLW
& sumin
BigalphabigmathbfxiT W yibigalphamathbfxiT W yiBig
& alphaleftlVert X W Y rightrVertalphaleftlVert X W Y rightrVert
onumber
endaligned
$$
Complete the following code to use the gradient descent to find $W$ when $alphaalphaalphaalpha$ and $alpha$ espectively.
Write your code in the part.
Hint: You may refer to Q for the gradient of $L$ norm.
Note: It may take ~ mins to run the algorithm.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
