\[RI = (a + b) / \binom{N}{2}\] where \(a\) is the number of pairs that belong to the same true subtype and are clustered together, \(b\) is the number of pairs that belong to different true subtypes and are not clustered together, and \(N\) is the number of possible pairs that can be formed from the \(N\) samples.
Intuitively, \(RI\) is the fraction of pairs that are grouped in the same way (either together or not) in the two partitions compared (e.g. 0.9 means 90% of pairs are grouped in the same way).