Last data update: 2014.03.03

R: getPurity
getPurityR Documentation

getPurity

Description

Gets the purity of a label vector wrt a ground truth (in the context of a clustering algorithm).

Usage

getPurity(truthLabels, inferLabels)

Arguments

truthLabels

ground truth labels, to which inferred labels are compared to compute the purity value

inferLabels

vector of inferred labels, which should have the same length as truthLabels

Value

purity value in [0,1]

Author(s)

Pierrick Bruneau

Examples

temp <- getPurity(c(1,1,1,2,1,5,3,4,5,3), c(2,2,2,3,1,1,3,4,2,3))

Results