Posted By


adkatrit on 02/11/11

Tagged


Statistics


Viewed 295 times
Favorited by 1 user(s)

Tanimoto Coefficient


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. def tanimoto(a,b):
  2. c=[v for v in a if v in b]
  3. return float(len(c))/len(a)+len(b)-len(c))

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.