A partition-based similarity for classification distributions