Adjusted Rand Index

This score is useful to compare the original label distribution with the clustering prediction. Ideally, we'd like to reproduce the exact ground truth distribution, but in general, this is very difficult in real-life scenarios. A way to measure the discrepancy is provided by the Adjusted Rand Index. In order to compute this score, we need to define the auxiliary variables:

  • a: Number of sample pairs (yi, yj) that have the same true label and that are assigned to the same cluster
  • bNumber of sample pairs (yi, yj) that have a different true label and that are assigned to different clusters

The Rand Index is defined as:

The Adjusted Rand Index is the Rand Index corrected for chance and it's defined as:

The RA measure  ...

Get Mastering Machine Learning Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.