documentationfor yFiles for HTML 2.6

Dendrogram

This class provides the result of hierarchical clustering algorithms by means of a binary tree structure.

Inheritance Hierarchy
Dendrogram

Remarks

The dendrogram is created using the agglomerative strategy (i.e., a bottom-up approach) based on the following steps:

  • At the beginning (i.e., at level 0), each node belongs to its own cluster. At this point, each node of the original graph (the one that will be clustered) is mapped to one of the dendrogram nodes that represent a leaf node (i.e., a node with no children).
  • At each step, pairs of clusters are merged while moving up to the hierarchy. In this case, a new dendrogram node is created and the corresponding dissimilarity value between the two merged clusters can be obtained using getDissimilarityValue. The dissimilarity values are monotone increasing starting from zero which corresponds to the leaf nodes of the dendrogram.
  • The algorithm continues until all nodes belong to the same cluster. At this point, the root of the dendrogram is reached and can be obtained using method root.

The dendrogram is a binary tree that is directed from the root to the leaves. This means that one can iterate the dendrogram starting with the root node, moving on to its children, then moving on to their children and so on.

From each node of the dendrogram, it is possible to retrieve the set of nodes of the original graph that belong to this dendrogram node using getClusterNodes. This method returns an array of YNodeLists that contain the nodes of all clusters that are merged when this dendrogram node was created. For example, say that clusters C1 = {v1, v2} and C2 = {v3, v4} are merged, where {v1, v2, v3, v4} are nodes of the original graph. Say that dendrogram node u is created by this merging. Then, the cluster nodes of u will be returned as two YNodeLists where the first contains nodes v1, v2 and the second v3, v4.

Type Details

yfiles module
algorithms
yfiles-umd modules
All layout modules, view-layout-bridge
Legacy UMD name
yfiles.algorithms.Dendrogram

See Also

Only the leaf nodes of the dendrogram are mapped with a node of the original graph. This means that for all other inner nodes of the dendrogram, method getOriginalNode returns null.

Properties

Methods