C

HierarchicalClusteringResult

Represents clusters in the graph and the dendrogram as computed by HierarchicalClustering.
Inheritance Hierarchy

Remarks

The dendrogram remains valid for the chosen metric and HierarchicalClusteringLinkage as long as the graph did not change in between. This can be used to efficiently cluster the same graph again with a different number of clusters or a different cut-off value for dissimilarity using either changeClusterCount or changeCutoff.

This class cannot be instantiated

See Also

Developer's Guide

Members

No filters for this type

Properties

Gets a collection of all clusters in the graph.
readonlyfinal

See Also

Developer's Guide
Gets the root of the dendrogram which is used internally to generate the clusters.

Initially each node comprises its own cluster. At each step of the clustering algorithm, two clusters are merged together until all nodes belong to the same cluster. The tree which is generated this way is stored as a dendrogram. The dendrogram's leaves thus represent clusters that each contain a single node. The dendrogram's root represents a cluster that contains every node of the graph.

The actual clusters can be calculated for a cluster count using changeClusterCount or for a cut-off value using changeCutoff.

The dendrogram's root can be null if the original graph was empty.

readonlyfinal

See Also

Developer's Guide
API
getDendrogramNode
Gets a mapping from each node to its cluster ID.
If no subgraph is specified, the ID of a cluster is a non-negative value which is common for all nodes of the same cluster. For results on a subgraph, all nodes that are not part of the subgraph have the ID -1.
readonlyfinal
Gets a mapping from each node to its cluster.
readonlyfinal

Methods

Creates a new HierarchicalClusteringResult with the given number of clusters.
final

Parameters

clusterCount: number
The cluster count. Must be positive; if it's greater than the number of nodes in the graph, the number of clusters in the result is equal to the number of nodes.

Return Value

HierarchicalClusteringResult
A new HierarchicalClusteringResult with the same dendrogramRoot and clusters calculated based on that dendrogram and the clusterCount.

See Also

Developer's Guide
Creates a new HierarchicalClusteringResult with clusters based on the given cutoff value.
final

Parameters

cutoff: number
The cutoff value for the clusters' dissimilarity.

Return Value

HierarchicalClusteringResult
A new HierarchicalClusteringResult with the same dendrogramRoot and clusters calculated based on that dendrogram and cutoff.

See Also

Developer's Guide
Gets the representative of node in the dendrogram.

The representative of node is one of the dendrogram's leaves which represents the cluster that only contains the node.

If a subgraph is specified, this method returns null if node is not part of the subgraph.

final

Parameters

node: INode
The node for which to retrieve the representative in the dendrogram.

Return Value

DendrogramNode
The representative of node in the dendrogram.

See Also

API
dendrogramRoot