0
$\begingroup$

For a linear regression model that I conducted, I'd like to review the regression plot of results. But since I have an input of size 6 parameters and target (output therefore) of 4, I get error when I use this code : source code

pyplot.scatter(x_train, y_train)
pyplot.plot(np.sort(x_values, axis=0,prediction)
pyplot.show()
$\endgroup$
3
  • $\begingroup$ You want to scatter data with more than 3 dimensions?? $\endgroup$ Jul 12, 2018 at 11:05
  • $\begingroup$ @AndreasLook No but there should be a measure of correctness of the regression analysis at the end $\endgroup$ Jul 12, 2018 at 11:28
  • $\begingroup$ You can use different plot for each target. $\endgroup$
    – Ankit Seth
    Jul 12, 2018 at 11:41

1 Answer 1

2
$\begingroup$

You can plot your residuals. I am sorry I can't write it in Python but in R you would do it like this:

plot(my.model$residuals)

This will give you a scatterplot that you WANT to look like a null plot. Any curve or pattern in the points means that your model is not a good fit.

If you are interested in assessing each variable's prediction power I recommend (because you only have six) doing 1 regression model on each variable by itself and then plotting the residuals of those models, again looking for a null plot. You can also look at the correlation of each predictor variable vs your response variable. Those with higher correlation will be better predictors.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.