Classes
Methods
clusterCenters(optionsopt) → (nullable) {Float64Array|Float64WasmArray}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Array containing the cluster centers in column-major format,
where rows are dimensions and columns are the clusters.
Alternatively null
, if fillable = false
and the array was not already filled.
- Type
- Float64Array | Float64WasmArray
clusters(optionsopt) → (nullable) {Int32Array|Int32WasmArray}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Array containing the cluster assignment for each cell.
Alternatively null
, if fillable = false
and the array was not already filled.
- Type
- Int32Array | Int32WasmArray
clusterSizes(optionsopt) → (nullable) {Int32Array|Int32WasmArray}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Array containing the number of cells in each cluster.
Alternatively null
, if fillable = false
and the array was not already filled.
- Type
- Int32Array | Int32WasmArray
free()
- Source:
Returns:
Frees the memory allocated on the Wasm heap for this object. This invalidates this object and all references to it.
iterations() → (nullable) {number}
- Source:
Returns:
Number of refinement iterations performed by the algorithm.
Alternatively null
, if this value has not been filled by setIterations
.
- Type
- number
numberOfCells() → {number}
- Source:
Returns:
Number of cells in the results.
- Type
- number
numberOfClusters() → {number}
- Source:
Returns:
Number of clusters in the results.
- Type
- number
setIterations(iterations)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
iterations |
number | Number of iterations. |
Returns:
The specified number of iterations is set in this object.
Typically only used after emptyClusterKmeansResults
.
setStatus(status)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
status |
number | Status of the k-means clustering. |
Returns:
The status is set in this object.
Typically only used after emptyClusterKmeansResults
.
status() → (nullable) {number}
- Source:
Returns:
Status of the algorithm - anything other than zero usually indicates a problem with convergence.
Alternatively null
, if this value has not been filled by setStatus
.
- Type
- number
withinClusterSumSquares(optionsopt) → (nullable) {Float64Array|Float64WasmArray}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Array containing the within-cluster sum of squares in each cluster.
Alternatively null
, if fillable = false
and the array was not already filled.
- Type
- Float64Array | Float64WasmArray