Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Created June 14, 2019 12:07
Show Gist options
  • Save MariaLavrovskaya/fc803ae9717f91c67e14af743c91614c to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/fc803ae9717f91c67e14af743c91614c to your computer and use it in GitHub Desktop.
#Slope for every predictor
df = pd.DataFrame({'Actual': Y_test.values.flatten(), 'Predicted': y_pred.flatten()})
df.head(25)
from sklearn.metrics import mean_squared_error, r2_score
print("Mean squared error: %.2f"
% mean_squared_error(Y_test, y_pred))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment