AggloClust2D | R Documentation |
This function performs a connectivity constrained 2D
agglomerative clustering using scikit-learn
function
AgglomerativeClustering
and outputs an object of class hclust
that stores the hierarchy of merges and value of criterion at each merge. It
also outputs the optimal level of the hierarchy with respect to the elbow
heuristic.
AggloClust2D(counts, nbClust = NULL)
## S3 method for class 'res2D'
print(x, ...)
## S3 method for class 'res2D'
summary(object, ...)
## S3 method for class 'res2D'
plot(x, ...)
counts |
an object of class
|
nbClust |
integer. Number of clusters to obtain. Set to |
x |
a |
... |
not used |
object |
a |
An object of class res2D
containing:
tree |
an object of class |
nbClust |
the number of clusters corresponding either to the value passed by the user or to the optimal level of clusters as provided by the elbow heuristic |
clustering |
obtained clustering |
Élise Jorge elise.jorge@inrae.fr
Sylvain Foissac sylvain.foissac@inrae.fr
Pierre Neuvial pierre.neuvial@math.univ-toulouse.fr
Nathalie Vialaneix nathalie.vialaneix@inrae.fr
data("pighic")
res2D <- AggloClust2D(pighic$data)
if (!is.null(res2D)) {# in case Python or modules are not available
clusters <- res2D$clustering
print(res2D)
summary(res2D)
plot(res2D)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.