Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. class Jaccard
  2. def self.coefficient(a,b)
  3. result = (a & b).length / (a + b).uniq.length.to_f
  4. (result * 1000).round / 1000.0
  5. end
  6. end
Add Comment
Please, Sign In to add comment