AI Glossary / AI and machine learning / Advanced
Rand index
Definition
The Rand index is a score between zero and one that measures how much two clusterings of the same items agree, by counting the pairs of items they treat the same way.
What it means
Clustering has no labels to check against, so one way to judge a result is to compare it with another clustering: a reference, a rival algorithm, or a rerun. The Rand index turns that comparison into a single number.
It works pair by pair. For every pair of items, ask two questions: does the first clustering put them together, and does the second? Pairs where both answers match, together-together or apart-apart, are agreements. Everything else is a disagreement.
The score is agreements over all pairs. One means identical groupings, and values near a half can arise by chance, which is why an adjusted version exists that corrects for luck.
How it works
Take the two clusterings of the same set of items.
Walk through every pair of items and sort it into one of four boxes: together in both, apart in both, together only in the first, or together only in the second.
Count the agreements: the together-together pairs plus the apart-apart pairs.
Divide agreements by the total number of pairs to get the index.
For small or lucky-looking scores, compute the adjusted Rand index, which subtracts the agreement expected by chance and rescales.
Three practical examples
- Comparing a customer segmentation from a new model with the one the marketing team already uses, to see whether the new grouping is a refinement or a revolution.
- Checking stability: clustering last quarter's transactions and this quarter's, then measuring how much the structure shifted.
- Evaluating a document grouping against a hand-made taxonomy when no cleaner ground truth exists.
Think of it this way
Think of seating plans for the same guests at two dinners. For every pair of guests, ask whether they shared a table at both dinners or sat apart at both. The Rand index is the share of pairs where the two dinners made the same call.
Worked example
counting the pairs
Suppose you cluster ten shops into three groups, and a reference clustering groups them slightly differently. The figures are illustrative.
There are forty-five pairs of shops. The two clusterings agree on thirty-six of them: pairs kept together in both, plus pairs kept apart in both.
The Rand index is thirty-six over forty-five, which is 0.80: strong agreement, with the differences concentrated in one borderline shop pair.
The general lesson: the number hides where the disagreement lives, so always ask which pairs, or which items, drive the gap.
Illustrative case study
A retail group rebuilt its store clustering after adding online sales data. The new clustering scored a Rand index of 0.71 against the old one, high enough to suggest the same skeleton but low enough to matter. Pair-level inspection showed the disagreements were almost all suburban stores migrating between two clusters. That finding redirected the debate from whose algorithm was right to what had genuinely changed in suburban buying. The score did not settle the argument, but it aimed it.
Common misconceptions and mistakes
- A high Rand index proves a clustering is correct. It only proves agreement with the comparison clustering; both can be wrong together.
- It works between zero and one like an accuracy. Random partitions score well above zero, so raw values need the chance-corrected, adjusted version for judgment.
- Pair counting is slow but essential. Shortcuts exist, and modern tools compute it fast, but the pair view is what gives the number its meaning.
- It judges clustering quality in absolute terms. It is purely comparative, so use it to rank options or track drift, not to certify a grouping as good.
Business use
Use it to quantify how disruptive a re-segmentation will be before you roll it out to teams who know the old groups.
Use it as a stability check: recluster monthly and watch the index for sudden drops that signal drifting data.
Prefer the adjusted Rand index when comparing across very different numbers of clusters, where raw agreement misleads.
Pair the score with a list of disagreeing items; the list is usually where the business insight sits.
Use it early in vendor bake-offs: two clustering tools that agree almost perfectly rarely justify a price difference on quality grounds.
People also ask
What does the Rand index measure?
Agreement between two clusterings of the same items, counted as the share of item pairs both clusterings treat the same way, together or apart.
What is the adjusted Rand index?
The same agreement measure corrected for the pairs that would agree by chance, so random groupings score near zero instead of misleadingly high.
When should a business use it?
When comparing a new segmentation with an old one, or checking whether a clustering is stable over time, before acting on the groups.
How many items can it handle?
Pair counting grows with the square of the item count, so thousands of items are fine but millions need sampling or the adjusted, more efficient implementations in standard tools.
Check your understanding
What does the Rand index measure, and why does the adjusted version exist?
Answer: It measures agreement between two clusterings by counting item pairs they treat identically, whether paired together or kept apart. The adjusted version exists because even random clusterings agree on many pairs, so the raw score flatters; subtracting chance agreement makes zero mean no better than luck.
Related terms
- Clustering
- Segmentation
- Stability
- Evaluation metric
- Ground truth
- adjusted Rand index
Learn next
AI for Business Owners covers how to read scores like this before signing off on a data project: https://aiforbusinessandlife.com/academy/ai-for-business-owners [C2]
More in AI and machine learning
- Quickprop - Quickprop is a neural-network optimization algorithm introduced by Scott Fahlman that uses successive gradient information to estimate larger, useful weight...
- Radial Basis Function regression - Radial Basis Function regression is a regression method that predicts a value as a weighted sum of radial basis functions, each one centered on a training...
- RAMnets - RAMnets are neural-style pattern-recognition systems built from memory lookup units rather than conventional connections with continuously adjusted...
- Random feature - A random feature is a component of a representation constructed using sampled parameters rather than learning every transformation parameter from the...
- Random forest - A random forest is a prediction model made of many decision trees trained on different random slices of the data, whose answers are combined by voting or...
- Random indexing - Random indexing is a method for building compact vector representations by assigning sparse random vectors to contexts and accumulating those vectors for...
Sources
[S13] Minka, Statistical Learning/Pattern Recognition Glossary; [S19] scikit-learn documentation, Metrics and scoring. Full URLs are in the source ledger. Verified 11 October 2026.
Previous: Ramsey RESET test Next: RAND-WALK word embedding model