new KMeans(matrix, K, metricopt, seedopt, initopt) → {KMeans}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
matrix | Matrix | |||
K | Numbers | |||
metric | function | <optional> | euclidean | |
seed | Number | <optional> | 1987 | |
init | Boolean | <optional> | true |
- Source
- To Do
- needs restructuring.
Returns:
- Type:
- KMeans
Methods
get_clusters() → {Array.<Array>}
- Source
Returns:
- Array of clusters with the indices of the rows in given
matrix
.
- Type:
- Array.<Array>
init(K)
Computes K
clusters out of the matrix
.
Parameters:
Name | Type | Description |
---|---|---|
K | Number | number of clusters. |
- Source