Continuously merge nodes that have the least dissimilarity

new agnes(data: Array<Array<number>>, options: object?)
Parameters
data (Array<Array<number>>) Array of points to be clustered
options (object? = {})
Name Description
options.distanceFunction Function?
options.method string? Default: 'complete'
options.isDistanceMatrix boolean? Is the input already a distance matrix?

Creates an array of clusters where the maximum height is smaller than the threshold

cut(threshold: number): Array<Cluster>
Parameters
threshold (number)
Returns
Array<Cluster>:

Merge the leaves in the minimum way to have groups number of clusters.

group(groups: number): Cluster
Parameters
groups (number) Them number of children the first level of the tree should have.
Returns
Cluster:

Returns a list of indices for all the leaves of this cluster. The list is ordered in such a way that a dendrogram could be drawn without crossing branches.

indices(): Array<number>
Returns
Array<number>:

Traverses the tree depth-first and calls the provided callback with each individual node

traverse(cb: function)
Parameters
cb (function) The callback to be called on each node encounter