- Dice's coefficient
-
Dice's coefficient, named after Lee Raymond Dice[1] and also known as the Dice coefficient, is a similarity measure over sets: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
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:
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]
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.
See also
- Jaccard index, which is equivalent: D = 2J / (1 + J) and J = D / (2 − D)
- Tversky index
- Levenshtein distance
- Sørensen similarity index
Notes
- ^ Dice, Lee R. (1945). "Measures of the Amount of Ecologic Association Between Species". Ecology 26 (3): 297–302. doi:10.2307/1932409. JSTOR 1932409.
- ^ van Rijsbergen, Cornelis Joost (1979). Information Retrieval. London: Butterworths. ISBN 3642122744. http://www.dcs.gla.ac.uk/Keith/Preface.html.
- ^ 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.
References
Categories:- Information retrieval
- String similarity measures
- Measure theory
Wikimedia Foundation. 2010.