Skip to content

Instantly share code, notes, and snippets.

@brockmanmatt
Created October 10, 2019 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brockmanmatt/51110593ae00d0a7f2a8dcf7d9fbba66 to your computer and use it in GitHub Desktop.
Save brockmanmatt/51110593ae00d0a7f2a8dcf7d9fbba66 to your computer and use it in GitHub Desktop.
from sklearn.metrics import mean_squared_error
from math import sqrt
testing = results.copy()
print("RMSE training using mean: {}".format(sqrt(mean_squared_error(testing.actual, testing.m))))
print("RMSE training using model: {}".format(sqrt(mean_squared_error(testing.actual, testing.predicted))))
testing = results[-len(h_predictions)-1:].copy()
print("RMSE testing using mean: {}".format(sqrt(mean_squared_error(testing.actual, testing.m))))
print("RMSE testing using model: {}".format(sqrt(mean_squared_error(testing.actual, testing.predicted))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment