Question: Q 1 . You are required to code the program which can solve the unconstrained optimization using the gradient descent method. Some guidelines regarding the
Q You are required to code the program which can solve the unconstrained optimization using the gradient descent method. Some guidelines regarding the program is:
marks
The program should have three different functions. The first one for gradient descent method, second for the function evaluation and third for computing the derivative of the function. The user who want to use your program for a new function should only need to change the second and third functions.
The learning rate the constant getting multiplied with the gradient should be allowed to change by the user.
The program should give the optimal point and optimal value of function as an output.
The program should also generate the plot of function values with iterations. Proper labeling should be done.
Optional: For the case of two variables, plot the variables history in the contour plot.
You can test the program for the following functions
do it by python coding write a generic python code for this question
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
