Question: Create a function to compute the intercept value in a linear regression. a = (y)(x^2) - (x)(xy)/n(x^2)-(x)^2 an example of a test for this function
Create a function to compute the intercept value in a linear regression.
a = (y)(x^2) - (x)(xy)/n(x^2)-(x)^2
an example of a test for this function would be:
print(round(intercept_function(np.array([21,12,22.5,2]), np.array([22,45,62,81])),4)))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
