big_rainer
big_rainer

Reputation: 13

tanimoto coefficient in the book of Programming Collective Intelligence

I have read the book of Programming Collective Intelligence. For the after-class exercise 1 of chapter 2, could someone please tell me how to calculate the tanimoto coefficient? A specific mathematical formula will be really appreciated.

Upvotes: 0

Views: 148

Answers (1)

Johannes
Johannes

Reputation: 523

An extensive search on a related question has given me two formulas:

  1. T(a,b) = N_intersection / (N_a + N_b - N_intersection) found here, which is the same as on Wikipedia in a slightly more readable fashion. EDIT: As per your comment, this is the one the OP was looking for.

  2. (n_11+n_00) / [n_11+2(n_10+n_01)+n_00], where

    • n_11: both have attribute,
    • n_00: both don't have attribute,
    • n_01 or n_10: only second/first object has the attribute.

For the source of the second equation have a look at http://reference.wolfram.com/language/ref/RogersTanimotoDissimilarity.html and calculate the similarity index from the dissimilarity index as (1-dissimilarity).

I believe that the second formula is commonly used in applied statistics and applied marketing.

Upvotes: 1

Related Questions