How do I use the parameters after I have found them using multiple linear regression?

linear_regression
python

#1

I wrote an algorithm for multiple linear regression from scratch using python, which works as expected. My question is, how do I use the parameters that I got to predict values for the test set? I am not using scikit learn so can’t use the predict method.
In case of Linear Regression I can just use the line equation and plugin the parameter values I got and that will be it. I can’t seem to figure out how to make it work for multiple linear regression. Any help will be appreciated. Thanks :slight_smile:


#2

Multiple linear regression is similar to linear regression. By training your model on data you estimate the optimal values for theta 1 through theta n. Then you can use these values to predict final outcome.
Lets take an example for illustration.
f(x)=theta0 + theta1x1 +thata2x2 + theta3x3 …thetanxn.
where f(x)= predicted value.
xn= value of your nth feature from training or test example.

This way you can predict values for multiple linear regression.


#3

Thank you. I did figure it out eventually. That said I fully appreciate the fact that you took out time to answer a stranger. Thank you very much.