Answered step by step
Verified Expert Solution
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
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
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