View source: R/ClusterRenameDescendingSize.R
ClusterRenameDescendingSize | R Documentation |
Renames the clusters of a classification in descending order.
ClusterRenameDescendingSize(Cls,
ProvideClusterNames=FALSE)
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. |
ProvideClusterNames |
TRUE: Provides in seperate output new and old k numbers, FALSE: simple output |
Beware: output changes in this function depending on ProvideClusterNames
in order to be congruent to prior code in a large varierity of other packages.
ProvideClusterNames==FALSE:
RenamedCls |
The renamed classification. A vector of clusters, were the largest cluster is C1 and so forth |
ProvideClusterNames==TRUE: List V with
RenamedCls |
The renamed classification. A vector of clusters, were the largest cluster is C1 and so forth |
ClusterName |
[1:k,1:2] matrix of k new numbers and prior numbers |
Michael Thrun, Alfred Ultsch
ClusterNormalize
data('Lsun3D')
Cls=Lsun3D$Cls
#not desceending cluster numbers
Cls[Cls==1]=543
Cls[Cls==4]=1
# Now ordered per cluster size and descending
ClusterRenameDescendingSize(Cls)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.