Skip to content Skip to sidebar Skip to footer

Scikit Learn Sklearn.linear_model.LinearRegression: View The Results Of The Model Generated

So, I can get sklearn.linear_model.LinearRegression to process my data - at least to run the script without raising any exceptions or warnings. The only issue is, that I am not try

Solution 1:

sklearn's API is designed around fitting training data and then generating predictions on test data without exposing much if any information about how the model is fit. While you can sometimes find the estimated parameters of the model by accessing the fitted model object's coef_ attribute, you won't find much in the way of parameter description functionality. This is because there may be no way to provide this information in a uniform way. The API is designed to let you treat a linear regression the same a random forest.

Since you are interested in a linear model, you can get the information you're looking for, including confidence intervals, goodness-of-fit statistics, and the like from the statsmodels library. See their OLS example: http://statsmodels.sourceforge.net/devel/examples/notebooks/generated/ols.html for details.


Post a Comment for "Scikit Learn Sklearn.linear_model.LinearRegression: View The Results Of The Model Generated"