View source: R/ClusterEqualWeighting.R
ClusterEqualWeighting | R Documentation |
Weights clusters equally
ClusterEqualWeighting(Cls, Data, MinClusterSize)
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. |
Data |
Optional, [1:n,1:d] matrix of dataset consisting of n cases of d-dimensional data points. Every case has d attributes, variables or features. |
MinClusterSize |
Optional, scalar defining the number of cases m that each cluster should have |
Balance clusters such that their sizes are the same by subsampling the larger cluster. If MinClusterSize
is missing the number of cases per cluster is set to the smallest cluster size. For clusters sizes smaller than MinClusterSize
, sampling with replacement is turned on, i.e. up sampling. For clusters sizes equal to MinClusterSize
, no sampling is performed.
List of
BalancedCls |
Vector of Cls such that all clusters have the same sizes spezified by |
BalancedInd |
index such that BalancedCls = Cls[BalancedInd] |
BalancedData |
NULL if missing, otherwise, Data[BalancedInd,] |
Alfred Ultsch (matlab), reimplemented by Michael Thrun
data(Hepta)
ClusterEqualWeighting(Hepta$Cls,Hepta$Data,5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.