Skip to content
Surf Wiki
Save to docs
general/information-retrieval-evaluation

From Surf Wiki (app.surf) — the open knowledge base

Dice-Sørensen coefficient

Statistic used for comparing the similarity of two samples


Summary

Statistic used for comparing the similarity of two samples

The Dice-Sørensen coefficient is a statistic used to gauge the similarity of two samples. It was independently developed by the botanists Lee Raymond Dice and Thorvald Sørensen, who published in 1945 and 1948 respectively.

Name

The index is known by several other names, especially Sørensen–Dice index, Sørensen index and Dice's coefficient. Other variations include the "similarity coefficient" or "index", such as Dice similarity coefficient (DSC). Common alternate spellings for Sørensen are Sorenson, Soerenson and Sörenson, and all three can also be seen with the –sen ending (the Danish letter ø is phonetically equivalent to the German/Swedish ö, which can be written as oe in ASCII).

Other names include:

  • F1 score
  • Czekanowski's binary (non-quantitative) index
  • Measure of genetic similarity
  • Zijdenbos similarity index, referring to a 1994 paper of Zijdenbos et al.

Formula

Sørensen's original formula was intended to be applied to discrete data. Given two sets, X and Y, it is defined as

: DSC = \frac{2 |X \cap Y|}{|X| + |Y|}

where |X| and |Y| are the cardinalities of the two sets (i.e. the number of elements in each set). The Sørensen index equals twice the number of elements common to both sets divided by the sum of the number of elements in each set. Equivalently, the index is the size of the intersection as a fraction of the average size of the two sets.

When applied to Boolean data, using the definition of true positive (TP), false positive (FP), and false negative (FN), it can be written as

: DSC = \frac{2 \mathit{TP}}{2 \mathit{TP} + \mathit{FP} + \mathit{FN}}.

It is different from the Jaccard index which only counts true positives once in both the numerator and denominator. DSC is the quotient of similarity and ranges between 0 and 1. It can be viewed as a similarity measure over sets.

Similarly to the Jaccard index, the set operations can be expressed in terms of vector operations over binary vectors a and b:

:s_v = \frac{2 | \bf{a} \cdot \bf{b} |}{| \bf{a} |^2 + | \bf{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 :{{cite book |last=van Rijsbergen |first=Cornelis Joost |year=1979

When taken as a string similarity measure, the coefficient may be calculated for two strings, x and y using bigrams as follows:{{cite conference |last=Kondrak |first=Grzegorz |author2=Marcu, Daniel |author3= Knight, Kevin |year=2003 |book-title=Proceedings of HLT-NAACL 2003: Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics

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

where n**t is the number of character bigrams found in both strings, n**x is the number of bigrams in string x and n**y 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.

Continuous Dice Coefficient

Source:

For a discrete (binary) ground truth A and continuous measures B in the interval [0,1], the following formula can be used:

cDC = \frac{2 |A \cap B|}{c * |A| + |B|}

Where |A \cap B| = \Sigma_i a_ib_i and |B| = \Sigma_i b_i

c can be computed as follows:

c = \frac{\Sigma_i a_ib_i}{\Sigma_i a_i \operatorname{sign}{(b_i)}}

If \Sigma_i a_i \operatorname{sign}{(b_i)} = 0 which means no overlap between A and B, c is set to 1 arbitrarily.

Difference from Jaccard

This coefficient is not very different in form from the Jaccard index. In fact, both are equivalent in the sense that given a value for the Sørensen–Dice coefficient S, one can calculate the respective Jaccard index value J and vice versa, using the equations J=S/(2-S) and S=2J/(1+J).

Since the Sørensen–Dice coefficient does not satisfy the triangle inequality, it can be considered a semimetric version of the Jaccard index.

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

:d(X, Y) = 1 - \frac{2 | X \cap Y |}{| X | + | Y |}

is not a proper distance metric as it does not satisfy the triangle inequality. The simplest counterexample of this is given by the three sets X={a}, Y={b} and Z = X \cup Y = {a, b}. We have d(X,Y)=1 and d(X,Z)=d(Y,Z)=1/3. To satisfy the triangle inequality, the sum of any two sides must be greater than or equal to that of the remaining side. However, d(X, Z) + d(Y, Z) = 2/3 .

Applications

The Sørensen–Dice coefficient is useful for ecological community data (e.g. Looman & Campbell, 1960). Justification for its use is primarily empirical rather than theoretical (although it can be justified theoretically as the intersection of two fuzzy sets). As compared to Euclidean distance, the Sørensen distance retains sensitivity in more heterogeneous data sets and gives less weight to outliers. Recently the Dice score (and its variations, e.g. logDice taking a logarithm of it) has become popular in computer lexicography for measuring the lexical association score of two given words. logDice is also used as part of the Mash Distance for genome and metagenome distance estimation Finally, Dice is used in image segmentation, in particular for comparing algorithm output against reference masks in medical applications.

Abundance version

The expression is easily extended to abundance instead of presence/absence of species. This quantitative version is known by several names:

  • Quantitative Sørensen–Dice index
  • Quantitative Sørensen index
  • Quantitative Dice index
  • Bray–Curtis similarity (1 minus the Bray-Curtis dissimilarity)
  • Czekanowski's quantitative index
  • Steinhaus index
  • Pielou's percentage similarity
  • Proportion of specific agreement or positive agreement

References

References

  1. Dice, Lee R.. (1945). "Measures of the Amount of Ecologic Association Between Species". Ecology.
  2. Sørensen, T.. (1948). "A method of establishing groups of equal amplitude in plant sociology based on similarity of species and its application to analyses of the vegetation on Danish commons". [[Kongelige Danske Videnskabernes Selskab]].
  3. (2020). "Evaluating White Matter Lesion Segmentations with Refined Sørensen-Dice Analysis". Scientific Reports.
  4. (1979). "Mathematical model for studying genetic variation in terms of restriction endonucleases". [[Proceedings of the National Academy of Sciences of the United States of America.
  5. (2009). "2009 Annual International Conference of the IEEE Engineering in Medicine and Biology Society". IEEE.
  6. (2010). "Semi-automated segmentation to assess the lateral meniscus in normal and osteoarthritic knees". Osteoarthritis and Cartilage.
  7. (1994). "Morphometric analysis of white matter lesions in MR images: method and validation". IEEE Transactions on Medical Imaging.
  8. (2003). "Estimating the effect of the similarity coefficient and the cluster algorithm on biogeographic classifications". Annales Botanici Fennici.
  9. (2018-04-25). "Continuous Dice Coefficient: a Method for Evaluating Probabilistic Segmentations".
  10. Gallagher, E.D., 1999. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1334&rep=rep1&type=pdf COMPAH Documentation], University of Massachusetts, Boston
  11. (1960). "Adaptation of Sorensen's K (1948) for estimating unit affinities in prairie vegetation". Ecology.
  12. (1986). "Ordination on the basis of fuzzy set theory". Vegetatio.
  13. McCune, Bruce & Grace, James (2002) Analysis of Ecological Communities. Mjm Software Design; {{ISBN. 0-9721290-0-6.
  14. [https://nlp.fi.muni.cz/raslan/2008/raslan08.pdf#page=14 Rychlý, P. (2008) A lexicographer-friendly association score. Proceedings of the Second Workshop on Recent Advances in Slavonic Natural Language Processing RASLAN 2008: 6–9]
  15. Ondov, Brian D., et al. "Mash: fast genome and metagenome distance estimation using MinHash." Genome biology 17.1 (2016): 1-14.
  16. (2000). "Non-Invasive Detection of Respiratory Effort-Related Arousals (RERAs) by a Nasal Cannula/Pressure Transducer System". Sleep.
  17. John Uebersax. "Raw Agreement Indices".
Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Dice-Sørensen coefficient — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report