Purity: Calculate Purity

Description Usage Arguments Value References See Also Examples

View source: R/Purity.R

Description

Calculate Purity measuring the mutual dependence between two clustering labels.

Usage

1
Purity(x, y)

Arguments

x

A vector of the predicted class labels

y

A vector of the true class labels. The length of y should be the same as x.

Value

This function returns Purity between two label vectors x and y.

References

\insertRef

Manning2008informationMKKC

See Also

AdjRandIndex, NormMI

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# true label
x <- rep(1:3, each = 10)

# predicted label
y <- sample(x)

# compare x and y
AdjRandIndex(x, y)
NormMI(x, y)
Purity(x, y)

SeojinBang/MKKC documentation built on Sept. 18, 2019, 1:42 p.m.