Class: BisectingKMeans

eclairjs/mllib/clustering.BisectingKMeans

new BisectingKMeans()

Constructs with the default configuration
Source:

Methods

getK() → {Promise.<number>}

Gets the desired number of leaf clusters.
Source:
Returns:
Type
Promise.<number>

getMaxIterations() → {Promise.<number>}

Gets the max number of k-means iterations to split clusters.
Source:
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.
Source:
Returns:
Type
Promise.<number>

getSeed() → {Promise.<number>}

Gets the random seed.
Source:
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
Source:
Returns:
model for the bisecting kmeans
Type
module:eclairjs/mllib/clustering.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 number
Source:
Returns:
Type
module:eclairjs/mllib/clustering.BisectingKMeans

setMaxIterations(maxIterations)

Sets the max number of k-means iterations to split clusters (default: 20).
Parameters:
Name Type Description
maxIterations number
Source:
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
Source:
Returns:

setSeed(seed)

Sets the random seed (default: hash value of the class name).
Parameters:
Name Type Description
seed number
Source:
Returns: