The Jaccard Index (or Jaccard Similarity Coefficient) is a metric used to measure the similarity between two sets.

It’s defined as the size of the intersection of the sets divided by the size of their union.
For sets $A$ and $B$, the formula is:
$$ Jaccard Index = \frac{|A \cap B|}{|A \cup B|} $$
Where:
The Jaccard Index ranges from 0 to 1:
The Jaccard Index is widely used for comparing the similarity between finite sample sets, particularly when dealing with binary or categorical data. It’s especially useful in clustering applications where objects are represented as sets of attributes or features.
Consider two sets: