/ Published in: Python
Expand |
Embed | Plain Text
def tanimoto(a,b): c=[v for v in a if v in b] return float(len(c))/len(a)+len(b)-len(c))
You need to login to post a comment.
adkatrit on 02/11/11
1 person have marked this snippet as a favorite
def tanimoto(a,b): c=[v for v in a if v in b] return float(len(c))/len(a)+len(b)-len(c))
You need to login to post a comment.