Recolor Classification IDs | R Documentation |
These functions return new classification IDs.
recolor(id.target, id.class, scatter.class = NULL, scatter.target = NULL)
rematch(tg.id, cl.id)
recode(id)
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. |
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.
See Details.
Ranjan Maitra.
https://www.stat.iastate.edu/people/ranjan-maitra
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.