getSorensenDiceCoefficient<TElement>(a, b): number
An implementation of the Sørensen–Dice coefficient, originally
formulated by Thorvald Sørensen (1948) and Lee Raymond Dice (1945)
respectively.
Formal definition: 2|A ∩ B|/(|A| + |B|), which is twice
the size of the intersection between A and B, divided by the sum
of the cardinality of both sets.
This method runs in bilinear time, or O(n * m), where
n = |B| (size of set B) and m = |A| (size of set A).
An implementation of the Sørensen–Dice coefficient, originally formulated by Thorvald Sørensen (1948) and Lee Raymond Dice (1945) respectively.
2|A ∩ B|/(|A| + |B|)
, which is twice the size of the intersection between A and B, divided by the sum of the cardinality of both sets.O(n * m)
, wheren = |B|
(size of set B) andm = |A|
(size of set A).