extCriteria | R Documentation |
extCriteria
calculates various external clustering comparison indices.
extCriteria(part1, part2, crit)
part1 |
|
part2 |
|
crit |
|
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.
A list containing the computed criteria, in the same order as in the
crit
argument.
Bernard Desgraupes
bernard.desgraupes@u-paris10.fr
University of Paris Ouest - Nanterre
Lab Modal'X (EA 3454)
See the bibliography at the end of the vignette.
getCriteriaNames
, intCriteria
,
bestCriterion
,
concordance
.
# 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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.