Skip to content

Instantly share code, notes, and snippets.

@VictorGarritano
Created November 6, 2017 19:35
Show Gist options
  • Save VictorGarritano/251c745aa535154f09d7650a3df6643c to your computer and use it in GitHub Desktop.
Save VictorGarritano/251c745aa535154f09d7650a3df6643c to your computer and use it in GitHub Desktop.
helper function to calculate hamming distance between two binary lists
hamming = lambda x,y: (1.0/len(x))*sum([a != b for a,b in zip(x,y)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment