getPurity: getPurity

Description Usage Arguments Value Author(s) Examples

View source: R/functions.R

Description

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

Usage

1
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

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

datautils documentation built on May 2, 2019, 8:56 a.m.