Question: 3.5 Try out gradient descent Run gradient descent to minimize the function g(w) = = 5 (ws +w + 10w) 50 3.8 Exercises (3.44)
3.5 Try out gradient descent Run gradient descent to minimize the function g(w) = = 5 (ws +w + 10w) 50 3.8 Exercises (3.44) with an initial point w = 2 and 1000 iterations. Make three separate runs using each of the steplength values a = 1, a = 10-, and a = 10-2. Compute the derivative of this function by hand, and implement it (as well as the function itself) in Python using Numpy. 73 Plot the resulting cost function history plot of each run in a single figure to compare their performance. Which steplength value works best for this partic- ular function and initial point?
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
import numpy as np import matplotlibpyplot as plt Define the function and its derivative def fw retu... View full answer
Get step-by-step solutions from verified subject matter experts
