0
votes

I have data that contains a, b, c features, and R result

a     b     c          R
245   49    158    166.6543133
3     195   191    100.3637372
.      .      .        .

I applied Linear regression using scikit learn Linear regression and got :

intercept B0 and [k0,k1,k2] Coefficients.

How can I predict the result using these variables without the need to use the predict function?

Edit :

I obtained the data by applying RGB to XYZ (CEI) and indeed the coefficients are similar to the standard formula.

Standard formula coeff    :  [0.4887180  0.3106803  0.2006017]
Linear regression coeff   :  [0.488718   0.3106803  0.2006017]
1

1 Answers

1
votes

You can create the variable yhat as

yhat = B0 + k0 * x1 + k1 * x2 + k2 * x3 

Where x1,x2 and x3 are your independent variables.

Note:

  • The above is the equation for a linear regression model and can be extended to any number of variables.
  • yhat stores the predicted value for a given value of x1,x2 and x3 based on the estimated coefficients