Created
November 6, 2017 19:35
-
-
Save VictorGarritano/251c745aa535154f09d7650a3df6643c to your computer and use it in GitHub Desktop.
helper function to calculate hamming distance between two binary lists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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