The objects of class
represent an agglomerative hierarchical clustering of a dataset.
agnes object is a list with the following components:
a vector giving a permutation of the original observations to allow for plotting, in the sense that the branches of a clustering tree will not cross.
a vector similar to
a vector with the distances between merging clusters at the successive stages.
the agglomerative coefficient, measuring the clustering structure of the dataset.
For each observation i, denote by m(i) its dissimilarity to the
first cluster it is merged with, divided by the dissimilarity of the
merger in the final step of the algorithm. The
an (n-1) by 2 matrix, where n is the number of observations. Row i
an object of class
a matrix containing the original or standardized measurements, depending
This class of objects is returned from
"agnes" class has methods for the following generic functions:
cutree(x, *) can be used to “cut”
the dendrogram in order to produce cluster assignments.
"agnes" inherits from
Therefore, the generic functions
as.hclust are available for
as.hclust(), all its methods are
available, of course.
data(agriculture) ag.ag <- agnes(agriculture) class(ag.ag) pltree(ag.ag) # the dendrogram ## cut the dendrogram -> get cluster assignments: (ck3 <- cutree(ag.ag, k = 3)) (ch6 <- cutree(as.hclust(ag.ag), h = 6)) stopifnot(identical(unname(ch6), ck3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.