rand_index Computes the rand index (or modified rand index) to describe the agreement between two partitions.