Question: 4. Implementing Gradient Descent. In this question you will implement gradient descent for an easy problem: convex quadratic functions. Consider the problem: min: f(x)
4. Implementing Gradient Descent. In this question you will implement gradient descent for an easy problem: convex quadratic functions. Consider the problem: min: f(x) = =Qx+qx. where Q is a (strictly) positive definite matrix, i.e., it is symmetric and all its eigenvalues are strictly positive. (a) Compute the gradient: Vf(x). (b) Implement gradient descent using three stepsize choices: n=1/t, me=1/t, and = n (in other words, the last one is for fixed n). (c) Randomly generate data (make sure that your matrix Q is symmetric and strictly posi- tive definite) and plot your results for the first two choices. For the third, find values of n for which gradient descent converges, and for which it diverges.
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
a Compute the Gradient The gradient of the function fxxTQxqTx is given by the partial derivatives wi... View full answer
Get step-by-step solutions from verified subject matter experts
