clustering Hierarchical_Clustering

new Hierarchical_Clustering(matrix, linkageopt, metricopt) → {Hierarchical_Clustering}

Parameters:
NameTypeAttributesDefaultDescription
matrixMatrix

Data or distance matrix if metric is 'precomputed'

linkage"single" | "complete" | "average"<optional>
"complete"
metricfunction | "precomputed"<optional>
euclidean
To Do
  • needs restructuring.

Methods

do()

computes the tree.

get_clusters(value, typeopt) → {Array.<Array>}

Parameters:
NameTypeAttributesDefaultDescription
valueNumber

value where to cut the tree.

type"distance" | "depth"<optional>
"distance"

type of value.

Returns:
  • Array of clusters with the indices of the rows in given matrix.
Type: 
Array.<Array>

init()

computes the tree.