Ordinary Least Squares, P Value, Regression, Statsmodels.
The coefficient of determination: 1 is perfect prediction r2_train=r2_score(y_train, y_train_predict) r2_test=r2_score(y_test, y_test_predict) print("TRAIN-model direct score R2: %.5f"%reg_ols.score(X_train_sc,y_train)) print("TRAIN-recomputed R2: %.5f" % r2_train) print("TEST R2: %.3f" % r2_test)