rlbl | R Documentation |
rlbl
Manual relabeling of clusters (to merge clusters or
relabel merged clusters).
rlbl(obj, old = 0, new = 0, reset = FALSE)
## S4 method for signature 'binClst'
rlbl(obj, old = 0, new = 0, reset = FALSE)
obj |
A binClst_instance. |
old |
The number of the cluster to be relabeled. |
new |
The new number of the cluster. |
reset |
A boolean value (defaults to FALSE). If reset=TRUE the labeling is reset to the original state. |
Whenever two adjacent clusters are merged, the label identifying the splitting variable between them both is meaningless, and the algorithm ends up assigning either a L or H only depending on how it evolved until reaching the merging point. Thus it can happen that the final labeling of the resulting cluster is not the most intuitive one. With this method the labels can be changed as desired. It can also be used to manually force the merging of two clusters.
This method does not return a relabeled copy of the input obj
,
instead the binClst_instance itself is relabeled. However, this is
intended only for output and visualization purposes (sctr(), lblp(),
cnfm(), view()) as the binClst_instance parameters (GMM parameters and
binary delimiters) are not recomputed. Thus the input instance can always be
reset to its original state.
This method does not return a relabeled copy of the input
obj
, instead the binClst_instance itself is relabeled. It is
intended only for visualization purposes, as it does not recompute the GMM
parameters nor the binary delimiters of the binClst_instance.
# -- apply EMbC to the example path --
mybcp <- stbc(expth,info=-1)
# -- manually merge clusters 1 and 2 --
rlbl(mybcp,1,2)
# -- reset to the original state --
rlbl(mybcp,reset=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.