new Hierarchical_Clustering(matrix, linkageopt, metricopt) → {Hierarchical_Clustering}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
matrix | Matrix | Data or distance matrix if metric is 'precomputed' | ||
linkage | "single" | | <optional> | "complete" | |
metric | function | | <optional> | euclidean |
- To Do
- needs restructuring.
Returns:
- Type:
- Hierarchical_Clustering
Methods
do()
computes the tree.
get_clusters(value, typeopt) → {Array.<Array>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value | Number | value where to cut the tree. | ||
type | "distance" | | <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.