Skip to content

Instantly share code, notes, and snippets.

@ekampf
Last active November 20, 2016 09:02
Show Gist options
  • Save ekampf/4997bc19e72c7433c44047282ec6d758 to your computer and use it in GitHub Desktop.
Save ekampf/4997bc19e72c7433c44047282ec6d758 to your computer and use it in GitHub Desktop.
Normalize values by std deviation
def zscore(numbers_list):
numbers = numpy.array(numbers_list)
return (numbers - numbers.mean()) / numbers.std()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment