Learn R Programming

partitionComparison (version 0.2.6)

computePairCoefficients: Compute the four coefficients \(N_{11}\), \(N_{10}\), \(N_{01}\), \(N_{00}\)

Description

Given two object partitions P and Q, of same length n, each of them described as a vector of cluster ids, compute the four coefficients (\(N_{11}\), \(N_{10}\), \(N_{01}\), \(N_{00}\)) all of the pair comparison measures are based on.

Usage

computePairCoefficients(p, q)

Arguments

p

The partition \(P\)

q

The partition \(Q\)

Author

Fabian Ball fabian.ball@kit.edu

Examples

Run this code
pc <- computePairCoefficients(new("Partition", c(0, 0, 0, 1, 1)), 
                              new("Partition", c(0, 0, 1, 1, 1)))
isTRUE(all.equal(N11(pc), 2))
isTRUE(all.equal(N10(pc), 2))
isTRUE(all.equal(N01(pc), 2))
isTRUE(all.equal(N00(pc), 4))

Run the code above in your browser using DataLab