Skip to content

Instantly share code, notes, and snippets.

@StrikingLoo
Created April 13, 2019 01:10
Show Gist options
  • Save StrikingLoo/4be03a0fcf7d3939fde7b209bcf84f25 to your computer and use it in GitHub Desktop.
Save StrikingLoo/4be03a0fcf7d3939fde7b209bcf84f25 to your computer and use it in GitHub Desktop.
import math
def msesqrt(std, test_label, preds):
squared_errors = [diff*diff for diff in (test_label - preds)]
return math.sqrt(sum(squared_errors)/len(preds))
msesqrt(std, test_label, first_preds) # 4.02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment