Learn R Programming

hicream (version 0.0.4)

AggloClust2D: Perform Constrained 2D Agglomerative Clustering

Description

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.

Usage

AggloClust2D(counts, nbClust = NULL)

# S3 method for res2D print(x, ...)

# S3 method for res2D summary(object, ...)

# S3 method for res2D plot(x, ...)

Value

An object of class res2D containing:

tree

an object of class hclust

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

Arguments

counts

an object of class InteractionSet obtained from the function loadData or an object of class resdiff obtained from function performTest.

nbClust

integer. Number of clusters to obtain. Set to NULL by default.

x

a res2D object to plot

...

not used

object

a res2D object to summarize

Author

Élise Jorge elise.jorge@inrae.fr
Sylvain Foissac sylvain.foissac@inrae.fr
Toby Dylan Hocking toby.hocking@r-project.org
Pierre Neuvial pierre.neuvial@math.univ-toulouse.fr
Nathalie Vialaneix nathalie.vialaneix@inrae.fr

Examples

Run this code
data("pighic")
# \donttest{
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)
}
# }

Run the code above in your browser using DataLab