Answered step by step
Verified Expert Solution
Link Copied!

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 gradient_descent(X, y, step_size, 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 25% tolerance.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions