classificationErrorDistance {partitionComparison} | R Documentation |
Classification Error Distance
Description
Compute the classification error distance
1 - \frac{1}{n} \max_{\sigma}{\sum_{C \in \cal{P}}{|C \cap \sigma(C)|}}
with \sigma
a weighted matching between the clusters of both partitions.
The nodes are the classes of each partition, the weights are the overlap of objects.
Usage
classificationErrorDistance(p, q)
## S4 method for signature 'Partition,Partition'
classificationErrorDistance(p, q)
Arguments
p |
The partition |
q |
The partition |
Methods (by class)
-
classificationErrorDistance(p = Partition, q = Partition)
: Compute given two partitions
Hint
This measure is implemented using lp.assign
from
the lpSolve
package to compute the maxmimal matching of a
weighted bipartite graph.
Author(s)
Fabian Ball fabian.ball@kit.edu
References
Meila M, Heckerman D (2001). “An Experimental Comparison of Model-Based Clustering Methods.” Machine Learning, 42(1), 9–29.
Meila M (2005). “Comparing Clusterings: An Axiomatic View.” In Proceedings of the 22nd International Conference on Machine Learning, ICML '05, 577–584. ISBN 978-1-59593-180-1, doi:10.1145/1102351.1102424.
Examples
isTRUE(all.equal(classificationErrorDistance(new("Partition", c(0, 0, 0, 1, 1)),
new("Partition", c(0, 0, 1, 1, 1))), 0.2))