R: Recolor Classification IDs

Recolor Classification IDs {EMCluster} | R Documentation

## 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.

### 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.

### Value

See Details.

### Author(s)

Ranjan Maitra.

### References

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

### Examples

    ## 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)

    ## End(Not run)

[Package EMCluster version 0.2-13 Index]