Learn R Programming

GFORCE (version 0.1.4)

gforce.metrics: Evaluates the correctness of a clustering solution.

Description

This can be used for either data or variable clustering. Cluster names can be either strings or numbers. Arbitrary data types cannot be used.

Usage

gforce.metrics(true_clust, est_clust, method = "purity")

Arguments

true_clust

length \(d\) vector of cluster assignments. This represents the true, or reference, clustering.

est_clust

length \(d\) vector of cluster assignments. This represents the estimated clustering.

method

the method used to evaluate the quality of the clustering solution est_clust. The three options are 'purity', 'perfect', 'misclassified-points'.

Value

Returns a numeric that represents the value of the chosen metric on the two clusterings true_clust and est_clust.

Examples

Run this code
# NOT RUN {
clust1 <- c(1,1,1,2,2,2,3,3,3)
clust2 <- c(1,1,2,1,2,2,3,3,3)
gforce.metrics(clust1,clust2,method='purity')
# }

Run the code above in your browser using DataLab