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

Description Usage Arguments Value Examples

View source: R/metrics.R

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

1
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

1
2
3
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')

GFORCE documentation built on May 2, 2019, 3:44 a.m.