Python Forum
Recommendation after running regression (approach) - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Recommendation after running regression (approach) (/thread-11592.html)



Recommendation after running regression (approach) - danishzmalik - Jul-17-2018

Hey all,

Im new to python and data science.

Ive generated a regression model using sklearns LinearRegression().

i.e LinearRegression(Train_features, train_label)

Train Features: x1,x2,x3
Train Label: y

My model works accurately with low mse scores.
My problem is that now i have to make a recommendation based on the model, and have to recommend a value for x1 (x1 is the only controllable feature), such that y = a required value.

What approach should i use for this?
I tried setting x1 as the response variable and and y as a predictor variable and then ran the regression but it gave me really high values for mse.

I know i can do it manually using the generated regression equation, but is there any way to do it on python?