jaccardIndex<E> function

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

Returns the Jaccard index between two list of items.

Parameters

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

Details

Jaccard index is a metric used to measure similarity and diversity of two samples sets. This is known by several other names:

  • Jaccard similarity coefficient
  • Tanimoto index
  • Tanimoto coefficient

See Also: tverskyIndex


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

Implementation

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