Machine Learning, Linear Regression, Linear Regression Python, Linear Regression Example, Regression Analysis.
regression. Let’s find it. y_pred = lr.predict(X_test) # predict test data r_squared = r2_score(y_test,y_pred) # calculate r2 score adjusted_r_squared = 1 - (1-r_squared)*(len(y)-1)/(len(y)-X.shape[1]-1) print('Adjusted R Squared: %',round(adjusted_r_squared*100,2), 'R Squared: