EMCluster (version 0.2-12)

Recolor Classification IDs: Recolor Classification IDs

Description

These functions return new classification IDs.

Usage

recolor(id.target, id.class, scatter.class = NULL, scatter.target = NULL)
rematch(tg.id, cl.id)
recode(id)

Arguments

id.target

target class ids.

id.class

original class ids.

scatter.class

scatter class ids.

scatter.target

scatter target class ids.

id

class ids.

tg.id

target class ids.

cl.id

class ids.

Value

See Details.

Details

The function recolor colors id.target in accordance with the most likely candidate in id.class. Note that if scatter is present, then the class given by 0 is represented as scatter and it is assumed to be the same for both classifications.

The function rematch returns a list as id.trcl and id.prcl. It is the heart of the recolor function and is usually called from recolor.

The function recode reoders classes to eliminate group ids without any members. It is assumed that the group ids are integers.

References

https://www.stat.iastate.edu/people/ranjan-maitra/

Examples

Run this code
# NOT RUN {
library(EMCluster, quietly = TRUE)

true.id <- c(1, 1, 1, 2, 2, 2, 3, 3, 3)
pred.id <- c(2, 1, 2, 1, 1, 1, 2, 1, 1)

recolor(pred.id, true.id)
# }

Run the code above in your browser using DataCamp Workspace