Python Forum

Full Version: Recommendation after running regression (approach)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?