mutualInformation {partitionComparison} | R Documentation |
Mutual Information
Description
Compute the mutual information
\sum_{C \in P} \sum_{D \in Q} {\frac{|C \cap D|}{n} \log n\frac{|C \cap D|}{|C| |D|}}
Usage
mutualInformation(p, q)
## S4 method for signature 'Partition,Partition'
mutualInformation(p, q)
Arguments
p |
The partition |
q |
The partition |
Methods (by class)
-
mutualInformation(p = Partition, q = Partition)
: Compute given two partitions
Author(s)
Fabian Ball fabian.ball@kit.edu
References
Vinh NX, Epps J, Bailey J (2010). “Information Theoretic Measures for Clusterings Comparison: Variants, Properties, Normalization and Correction for Chance.” Journal of Machine Learning Research, 11, 2837–2854.
See Also
Examples
isTRUE(all.equal(mutualInformation(new("Partition", c(0, 0, 0, 1, 1)),
new("Partition", c(0, 0, 1, 1, 1))), 4/5*log(5/3) + 1/5*log(5/9)))
[Package partitionComparison version 0.2.6 Index]