Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. [10 points) For a linear regression problem suppose we have just a single variable x. a. Write down the hypothesis function. b. Consider the

image text in transcribed

2. [10 points) For a linear regression problem suppose we have just a single variable x. a. Write down the hypothesis function. b. Consider the following datapoints (x,y) = (166, 54), (195, 82), (200, 72), (260, 72), (265, 90), (335, 124), (370,94), (450, 118), (517, 152), (552, 132). Write a code in python or any other language that you prefer to find the values of the coefficients of the hypothesis function that fits the data best. You should use gradient descent algorithm. Print the outputs and the fitted function along with the data. c. Assume instead of the single variable x you also use x as the 2nd variable in the hypothesis function. Update your code for question 2(b) to find the coefficients for this regression

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

What lessons in OD contracting does this case represent?

Answered: 1 week ago

Question

Does the code suggest how long data is kept and who has access?

Answered: 1 week ago