Dice's coefficient

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Dice's coefficient, named after Lee Raymond Dice[1] and also known as the Dice coefficient, is a similarity measure over sets:

s = \frac{2 | X \cap Y |}{| X | + | Y |}

It is identical to the Sørensen similarity index, and is occasionally referred to as the Sørensen-Dice coefficient. It is not very different in form from the Jaccard index but has some different properties.

The function ranges between zero and one, like Jaccard. Unlike Jaccard, the corresponding difference function

d = 1 -  \frac{2 | X \cap Y |}{| X | + | Y |}

is not a proper distance metric as it does not possess the property of triangle inequality. The simplest counterexample of this is given by the three sets {a}, {b}, and {a,b}, the distance between the first two being 1, and the difference between the third and each of the others being one-third.

Similarly to Jaccard, the set operations can be expressed in terms of vector operations over binary vectors A and B:

s_v = \frac{2 | A \cdot B |}{| A |^2 + | B |^2}

which gives the same outcome over binary vectors and also gives a more general similarity metric over vectors in general terms.

For sets X and Y of keywords used in information retrieval, the coefficient may be defined as twice the shared information (intersection) over the sum of cardinalities :[2]

When taken as a string similarity measure, the coefficient may be calculated for two strings, x and y using bigrams as follows:[3]

s = \frac{2 n_t}{n_x + n_y}

where nt is the number of character bigrams found in both strings, nx is the number of bigrams in string x and ny is the number of bigrams in string y. For example, to calculate the similarity between:

night
nacht

We would find the set of bigrams in each word:

{ni,ig,gh,ht}
{na,ac,ch,ht}

Each set has four elements, and the intersection of these two sets has only one element: ht.

Inserting these numbers into the formula, we calculate, s = (2 · 1) / (4 + 4) = 0.25.

[edit] See also

[edit] Notes

  1. ^ Dice, Lee R. (1945). "Measures of the Amount of Ecologic Association Between Species". Ecology 26 (3): 297–302. doi:10.2307/1932409. JSTOR 1932409. 
  2. ^ van Rijsbergen, Cornelis Joost (1979). Information Retrieval. London: Butterworths. ISBN 3642122744. http://www.dcs.gla.ac.uk/Keith/Preface.html. 
  3. ^ Kondrak, Grzegorz; Marcu, Daniel; and Knight, Kevin (2003). "Cognates Can Improve Statistical Translation Models". Proceedings of HLT-NAACL 2003: Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics. pp. 46–48. http://aclweb.org/anthology/N/N03/N03-2016.pdf. 

[edit] References

Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages