Regression Analysis, R Squared, Pseudo R Squared, Adjusted R Squared, Deviance.
we need to add a y intercept. This is the ‘β0’ in the equation of the straight line: y_pred = β1*X + β0 X = sm.add_constant(X) Next, we build and fit the OLS regression model and print the training summary: olsr_model = OLS(endog=y, exog=X) olsr_results = olsr_model.fit()