View source: R/HierarchicalClustering.R
HierarchicalClustering | R Documentation |
Wrapper for various agglomerative hierarchical clustering algorithms.
HierarchicalClustering(DataOrDistances,ClusterNo,Type='SingleL',Fast=TRUE,Data,...)
DataOrDistances |
Either nonsymmetric [1:n,1:d] numerical matrix of a dataset to be clustered. It consists of n cases of d-dimensional data points. Every case has d attributes, variables or features. or symmetric [1:n,1:n] distance matrix, e.g. |
ClusterNo |
A number k which defines k different clusters to be built by the algorithm. |
Type |
Method of cluster analysis: "Ward", "SingleL", "CompleteL", "AverageL" (UPGMA), "WPGMA" (mcquitty), "MedianL" (WPGMC), "CentroidL" (UPGMC), "Minimax", "MinEnergy", "Gini","HDBSCAN", or "Sparse" |
Fast |
If TRUE and fastcluster installed, then a faster implementation of the methods above can be used except for "Minimax", "MinEnergy", "Gini" or "HDBSCAN" |
Data |
[1:n,1:d] data matrix in the case that |
... |
Further arguments passed on to either |
Please see HierarchicalClusterData
and HierarchicalClusterDists
or the other functions listed above.
It should be noted that in case of "HDBSCAN" the number of clusters is manually selected by cutree
to have the same convention as the other algorithms. Usually, "HDBSCAN" selects the number of clusters automatically.
List of
Cls |
If, ClusterNo>0: [1:n] numerical vector with n numbers defining the classification as the main output of the clustering algorithm. It has k unique numbers representing the arbitrary labels of the clustering. Otherwise for ClusterNo=0: NULL |
Dendrogram |
Dendrogram of hierarchical clustering algorithm |
Object |
Ultrametric tree of hierarchical clustering algorithm |
Michael Thrun
HierarchicalClusterData
HierarchicalClusterDists
,
MinimalEnergyClustering
.
data('Hepta')
out=HierarchicalClustering(Hepta$Data,ClusterNo=7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.