# Relation between Rand index and accuracy [duplicate]

I am solving a problem on binary classification. The Wikipedia page of the Rand index states that for binary classification the Rand index is equivalent to the accuracy:

$$R I=\frac{T P+T N}{T P+F P+F N+T N}$$

Is this statement right?. I am solving a binary classification problem. I have computed the accuracy and the rand index using sklearn.metrics.rand_score. Nevertheless they lead to a different result. I have found a similar question in https://stats.stackexchange.com/questions/344281/difference-between-accuracy-and-rand-index-r#:~:text=Rand%20index%20is%20accuracy%20computed,is%20invariant%20to%20renaming%20clusters but it is not the same case since I have checked that the accuracy doesn't correspond to the Rand neither for the clustering nor for the permutation of the clustering.

• I believe this is the same question. It’s not about permuting the clustering. It’s about considering pairs of items to be clustered: were they grouped together or not? The Rand index is the accuracy over these pairs. That’s the gist of the answer to the other question, as well. Apr 1 at 23:25
• Does this answer your question? difference between accuracy and Rand index (R) Apr 1 at 23:26