Represents the result of a hierarchical clustering algorithm in the form of a binary tree structure.
Remarks
This class constructs a dendrogram using an agglomerative hierarchical clustering strategy, which follows a bottom-up approach. The process consists of the following steps:
- Initially, at level
0
, each node exists as its own cluster. In this stage, each node of the original graph (which is to be clustered) corresponds to a leaf node in the dendrogram, representing a node with no children. - As the process continues, pairs of clusters are merged step by step, ascending through the hierarchy. With each merge, a new dendrogram node is created. The dissimilarity value associated with the merging of two clusters can be retrieved via the getDissimilarityValue method. These dissimilarity values are non-decreasing, starting from zero, which corresponds to the dissimilarity at the leaf nodes.
- The clustering process concludes when all nodes are combined into a single cluster, resulting in the root of the dendrogram. The root node can be accessed using the root property.
The resulting dendrogram is a directed binary tree, with the direction flowing from the root to the leaf nodes. You can traverse the dendrogram by starting from the root node and proceeding through its children using the getChildren method, continuing this process recursively through each subsequent level of the tree.
For any given dendrogram node, you can retrieve the set of nodes from the original graph that were grouped into that dendrogram node using the getClusterNodes method. This method returns an array of IEnumerable<T>, where each IEnumerable<T> contains the nodes from the original clusters that were merged to form the dendrogram node. For instance, if clusters C1 = {n1, n2}
and C2 = {n3, n4}
are merged to create a dendrogram node u
, getClusterNodes will return two IEnumerable<T> collections, the first containing nodes n1, n2
and the second containing nodes n3, n4
.
This class cannot be instantiated
Type Details
- yFiles module
- algorithms
See Also
null
.Properties
Gets the root node of the dendrogram.
Remarks
Property Value
Methods
Returns an IEnumerable<T> with LayoutNode that contains the child nodes of the given parent node.
Remarks
Parameters
A map of options to pass to the method.
- parent - LayoutNode
- the parent node for which to retrieve the child nodes
Returns
- ↪IEnumerable<LayoutNode>
- the list of child nodes of the given parent node
Returns an array of IEnumerable<T> with LayoutNodes that contain the nodes of the original graph that are associated with the given dendrogram node.
Remarks
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 IEnumerable<T> with LayoutNodes where the first contains nodes v1, v2
and the second v3, v4
.Parameters
A map of options to pass to the method.
- node - LayoutNode
- the given dendrogram node
Returns
- ↪IEnumerable<LayoutNode>[]
- an array of IEnumerable<T> with LayoutNodes that contain the nodes of the original graph that are associated with the given dendrogram node
Returns the dissimilarity value associated with the given node of the dendrogram.
Parameters
A map of options to pass to the method.
- node - LayoutNode
- the given dendrogram node
Returns
- ↪number
- the dissimilarity value associated with the given dendrogram node
Returns the level of the given node of the dendrogram.
Parameters
A map of options to pass to the method.
- node - LayoutNode
- the given dendrogram node
Returns
- ↪number
- the level of the given dendrogram node
Returns the node of the dendrogram that belongs to the given level index.
Remarks
null
.Parameters
A map of options to pass to the method.
- level - number
- the given level index
Returns
- ↪LayoutNode?
- the node of the dendrogram that belongs to the given level index or
null
if there exists no level with the given index.
Throws
Returns the node of the original graph that is mapped with the given leaf node of the dendrogram.
Parameters
A map of options to pass to the method.
- node - LayoutNode
- The given leaf node
Returns
- ↪LayoutNode?
- The node of the original graph that is mapped with the given leaf node or
null
if the given node is an inner dendrogram node
null
if the given node is not a leaf node.Returns whether or not the given dendrogram node is a leaf node.
Remarks
Parameters
A map of options to pass to the method.
- node - LayoutNode
- a dendrogram node
Returns
- ↪boolean
true
if the given node is a leaf node,false
otherwise