API reference

andrey.metrics.adjusted_rand_index#

andrey.metrics.adjusted_rand_index(labels_a, labels_b)[source]#

Adjusted Rand index between two label vectors (chance-corrected; 1.0 is identical).

Return type:

float

Examples

>>> adjusted_rand_index([0, 0, 1, 1], [1, 1, 0, 0])
1.0