AggloClust2D: Performs Constrained 2D Agglomerative Clustering

View source: R/AggloClust2D.R

AggloClust2DR Documentation

Performs 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 class 'res2D'
print(x, ...)

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

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

Arguments

counts

an object of class InteractionSet obtained from the function loadData.

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

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

Author(s)

É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

Examples

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)
}


hicream documentation built on Aug. 8, 2025, 7:26 p.m.