Learn R Programming

fdm2id (version 0.9.9)

compare: Comparison of two sets of clusters

Description

Comparison of two sets of clusters

Usage

compare(clus, gt, eval = "accuracy", comp = c("max", "pairwise", "cluster"))

Value

A numeric value indicating how much the two sets of clusters are similar.

Arguments

clus

The extracted clusters.

gt

The real clusters.

eval

The evluation criterion.

comp

Indicates whether a "max" or a "pairwise" evaluation should be used, or the evaluation for each individual "cluster".

See Also

compare.accuracy, compare.jaccard, compare.kappa, intern, stability

Examples

Run this code
require (datasets)
data (iris)
km = KMEANS (iris [, -5], k = 3)
compare (km$cluster, iris [, 5])
if (FALSE) {
compare (km$cluster, iris [, 5], eval = c ("accuracy", "kappa"), comp = "pairwise")
}

Run the code above in your browser using DataLab