Rand index.
The Rand Index computes a similarity measure between two clusterings by considering all pairs of samples and counting pairs that are assigned in the same or different clusters in the predicted and true clusterings [1] [2].
The raw RI score [3] is:
RI = (number of agreeing pairs) / (number of pairs)
Read more in the User Guide.
Ground truth class labels to be used as a reference.
Cluster labels to evaluate.
Similarity score between 0.0 and 1.0, inclusive, 1.0 stands for perfect match.
References
Examples
Perfectly matching labelings have a score of 1 even
>>> from sklearn.metrics.cluster import rand_score >>> rand_score([0, 0, 1, 1], [1, 1, 0, 0]) 1.0
Labelings that assign all classes members to the same clusters are complete but may not always be pure, hence penalized:
>>> rand_score([0, 0, 1, 2], [0, 0, 1, 1]) 0.83
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4