diceIndex<E> function

double diceIndex<E>(
  1. List<E> source,
  2. List<E> target
)

Finds the Sørensen–Dice coefficient of two list of items.

Parameters

  • source is the variant list
  • target is the prototype list

Details

Sørensen–Dice coefficient is a metric used to measure similarity between two samples. This is known by several other names:

  • Sørensen index
  • Dice's coefficient
  • Dice similarity coefficient (DSC)

Tversky index is a generalization of Dice index when alpha = 0.5, and beta = 0.5

See Also: tverskyIndex


Complexity: Time O(n log n) | Space O(n)

Implementation

double diceIndex<E>(List<E> source, List<E> target) {
  return tverskyIndex(source, target, alpha: 0.5, beta: 0.5);
}