Learn R Programming

partitionComparison (version 0.2.5)

jaccardCoefficient: Jaccard Coefficient

Description

Compute the Jaccard coefficient $$\frac{N_{11}}{N_{11} + N_{10} + N_{01}}$$

Usage

jaccardCoefficient(p, q)

# S4 method for Partition,Partition jaccardCoefficient(p, q)

# S4 method for PairCoefficients,missing jaccardCoefficient(p, q = NULL)

Arguments

p

The partition \(P\) or an instance of PairCoefficients

q

The partition \(Q\) or NULL

Methods (by class)

  • p = Partition,q = Partition: Compute given two partitions

  • p = PairCoefficients,q = missing: Compute given the pair coefficients

Author

Fabian Ball fabian.ball@kit.edu

References

Jaccard1908partitionComparison

Examples

Run this code
isTRUE(all.equal(jaccardCoefficient(new("Partition", c(0, 0, 0, 1, 1)), 
                                    new("Partition", c(0, 0, 1, 1, 1))), 1/3))

Run the code above in your browser using DataLab