Method: OpenTox::Algorithm::Similarity.tanimoto

Defined in:
lib/similarity.rb

.tanimoto(fingerprints) ⇒ Float

Get Tanimoto similarity



25
26
27
# File 'lib/similarity.rb', line 25

def self.tanimoto fingerprints
  ( fingerprints[0] & fingerprints[1]).size/(fingerprints[0]|fingerprints[1]).size.to_f
end