rlbl: Manual relabeling of clusters.

Description Usage Arguments Details Value Examples

Description

rlbl Manual relabeling of clusters (to merge clusters or relabel merged clusters).

Usage

1
2
3
4
rlbl(obj, old = 0, new = 0, reset = FALSE)

## S4 method for signature 'binClst'
rlbl(obj, old = 0, new = 0, reset = FALSE)

Arguments

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.

Details

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.

Value

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.

Examples

1
2
3
4
5
6
# -- 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)

Example output

[1]   0  -0.0000e+00       4       600
[1] ... Stable clustering

EMbC documentation built on May 7, 2018, 5:04 p.m.