Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Implement gradient descent for the least squares problem in any programming language you wish, and run it on our synthetic test data. Write a function
Implement gradient descent for the least squares problem in any programming language you wish, and run it on our synthetic test data. Write a function with a signature similar to gradientdescentX y stepsize, precision so that can be run on more than one data set. Note: the least squares problem here is
Try a number of different choices of step size. You are looking for the optimal step size, which is the choice of step size that results in the fewest number of iterations before convergence. You should use a termination condition that uses a relative precision of or better for and can use an initial starting of all zeros although in practice, the result depends only very weakly on these choices
What is the optimal step size that you find? Please enter the value with a precision of at least one significant figure, your answer will be graded with a tolerance.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started