new BisectingKMeans()
Constructs with the default configuration
Methods
getK() → {Promise.<number>}
Gets the desired number of leaf clusters.
Returns:
- Type
- Promise.<number>
getMaxIterations() → {Promise.<number>}
Gets the max number of k-means iterations to split clusters.
Returns:
- Type
- Promise.<number>
getMinDivisibleClusterSize() → {Promise.<number>}
Gets the minimum number of points (if >= `1.0`) or the minimum proportion of points
(if < `1.0`) of a divisible cluster.
Returns:
- Type
- Promise.<number>
getSeed() → {Promise.<number>}
Gets the random seed.
Returns:
- Type
- Promise.<number>
run(input) → {module:eclairjs/mllib/clustering.BisectingKMeansModel}
Runs the bisecting k-means algorithm.
Parameters:
Name | Type | Description |
---|---|---|
input |
module:eclairjs/rdd.RDD | RDD of vectors |
Returns:
model for the bisecting kmeans
setK(k) → {module:eclairjs/mllib/clustering.BisectingKMeans}
Sets the desired number of leaf clusters (default: 4).
The actual number could be smaller if there are no divisible leaf clusters.
Parameters:
Name | Type | Description |
---|---|---|
k |
number |
Returns:
setMaxIterations(maxIterations)
Sets the max number of k-means iterations to split clusters (default: 20).
Parameters:
Name | Type | Description |
---|---|---|
maxIterations |
number |
Returns:
setMinDivisibleClusterSize(minDivisibleClusterSize)
Sets the minimum number of points (if >= `1.0`) or the minimum proportion of points
(if < `1.0`) of a divisible cluster (default: 1).
Parameters:
Name | Type | Description |
---|---|---|
minDivisibleClusterSize |
number |
Returns:
setSeed(seed)
Sets the random seed (default: hash value of the class name).
Parameters:
Name | Type | Description |
---|---|---|
seed |
number |