Redfines some or all Clusters of Clustering such that the names of the numerical vectors are defined by
ClusterRedefine(Cls, NewLabels,OldLabels)
Arguments
Cls: 1:n numerical vector of numbers defining the classification as the main output of the clustering algorithm for the n cases of data. It has k unique numbers representing the arbitrary labels of the clustering.
NewLabels: [1:p], p<=k labels (identifiers) of clusters to be changed with
OldLabels: Optional, [1:p], p<=k labels(identifiers) of clusters to be changed, default [1:k] unique cluster Ids of Cls
Details
The same ordering of NewLabels and OldLabels is assumend, i.e., the mapping is defined by OldLabels[i] -> NewLabels[i] with i in [1:p]. NewLabels can also be a vector for strings, for example for plotting.
Returns
Cls[1:n] numerical vector named after the row names of data