extCriteria: Compute external clustering criteria

View source: R/main.R

extCriteriaR Documentation

Compute external clustering criteria

Description

extCriteria calculates various external clustering comparison indices.

Usage

  extCriteria(part1, part2, crit)

Arguments

part1

[vector] : the first partition vector.

part2

[vector] : the second partition vector.

crit

[vector] : a vector containing the names of the indices to compute.

Details

The function extCriteria calculates external clustering indices in order to compare two partitions. The list of all the supported criteria can be obtained with the getCriteriaNames function.

The currently available indices are :

  • "Czekanowski_Dice"

  • "Folkes_Mallows"

  • "Hubert"

  • "Jaccard"

  • "Kulczynski"

  • "McNemar"

  • "Phi"

  • "Precision"

  • "Rand"

  • "Recall"

  • "Rogers_Tanimoto"

  • "Russel_Rao"

  • "Sokal_Sneath1"

  • "Sokal_Sneath2"

All the names are case insensitive and can be abbreviated. The keyword "all" can also be used as a shortcut to calculate all the external indices.

The partition vectors should not have empty subsets. No attempt is made to verify this.

Value

A list containing the computed criteria, in the same order as in the crit argument.

Author

Bernard Desgraupes
bernard.desgraupes@u-paris10.fr
University of Paris Ouest - Nanterre
Lab Modal'X (EA 3454)

References

See the bibliography at the end of the vignette.

See Also

getCriteriaNames, intCriteria, bestCriterion, concordance.

Examples

# Generate two artificial partitions
part1<-sample(1:3,150,replace=TRUE)
part2<-sample(1:5,150,replace=TRUE)

# Compute all the external indices
extCriteria(part1,part2,"all")
# Compute some of them
extCriteria(part1,part2,c("Rand","Folkes"))
# The names are case insensitive and can be abbreviated
extCriteria(part1,part2,c("ra","fo"))

clusterCrit documentation built on Nov. 23, 2023, 5:06 p.m.