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