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

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

**Tan_Moy**#1

**DigvijayRana**#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 + theta1*x1 +thata2*x2 + theta3*x3 …thetan*xn.

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.

**Tan_Moy**#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.