🎁  Jaccard index

Jaccard index#

Intersection over union of two sets, a similarity measure.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

The Jaccard index (Jaccard similarity coefficient) measures the overlap between two sets — the size of their intersection over the size of their union. For items, the sets are typically the users who liked each item, or their tags / features.

The formula#

\[J(A, B) = \frac{|A \cap B|}{|A \cup B|},\]

ranging 0 to 1 — 0 for disjoint sets, 1 for identical ones; the complement \(1 - J\) is the Jaccard distance.

When to use it#

It is the natural choice for binary (like / dislike, present / absent) data, where magnitudes don’t matter — only which elements are shared. Contrast with cosine, which works on real-valued vectors.


Theme: Recommender Systems  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Jaccard index (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: advanced