Class

org.apache.spark.mllib.clustering

BisectingKMeans

Related Doc: package clustering

Permalink

class BisectingKMeans extends Logging

A bisecting k-means algorithm based on the paper "A comparison of document clustering techniques" by Steinbach, Karypis, and Kumar, with modification to fit Spark. The algorithm starts from a single cluster that contains all points. Iteratively it finds divisible clusters on the bottom level and bisects each of them using k-means, until there are k leaf clusters in total or no leaf clusters are divisible. The bisecting steps of clusters on the same level are grouped together to increase parallelism. If bisecting all divisible clusters on the bottom level would result more than k leaf clusters, larger clusters get higher priority.

Annotations
@Since( "1.6.0" )
Source
BisectingKMeans.scala
See also

Steinbach, Karypis, and Kumar, A comparison of document clustering techniques, KDD Workshop on Text Mining, 2000.

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BisectingKMeans
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BisectingKMeans()

    Permalink

    Constructs with the default configuration

    Constructs with the default configuration

    Annotations
    @Since( "1.6.0" )

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def getK: Int

    Permalink

    Gets the desired number of leaf clusters.

    Gets the desired number of leaf clusters.

    Annotations
    @Since( "1.6.0" )
  11. def getMaxIterations: Int

    Permalink

    Gets the max number of k-means iterations to split clusters.

    Gets the max number of k-means iterations to split clusters.

    Annotations
    @Since( "1.6.0" )
  12. def getMinDivisibleClusterSize: Double

    Permalink

    Gets the minimum number of points (if >= 1.0) or the minimum proportion of points (if < 1.0) of a divisible cluster.

    Gets the minimum number of points (if >= 1.0) or the minimum proportion of points (if < 1.0) of a divisible cluster.

    Annotations
    @Since( "1.6.0" )
  13. def getSeed: Long

    Permalink

    Gets the random seed.

    Gets the random seed.

    Annotations
    @Since( "1.6.0" )
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  18. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  19. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  20. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  21. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  24. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  25. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def run(data: JavaRDD[Vector]): BisectingKMeansModel

    Permalink

    Java-friendly version of run().

  34. def run(input: RDD[Vector]): BisectingKMeansModel

    Permalink

    Runs the bisecting k-means algorithm.

    Runs the bisecting k-means algorithm.

    input

    RDD of vectors

    returns

    model for the bisecting kmeans

    Annotations
    @Since( "1.6.0" )
  35. def setK(k: Int): BisectingKMeans.this.type

    Permalink

    Sets the desired number of leaf clusters (default: 4).

    Sets the desired number of leaf clusters (default: 4). The actual number could be smaller if there are no divisible leaf clusters.

    Annotations
    @Since( "1.6.0" )
  36. def setMaxIterations(maxIterations: Int): BisectingKMeans.this.type

    Permalink

    Sets the max number of k-means iterations to split clusters (default: 20).

    Sets the max number of k-means iterations to split clusters (default: 20).

    Annotations
    @Since( "1.6.0" )
  37. def setMinDivisibleClusterSize(minDivisibleClusterSize: Double): BisectingKMeans.this.type

    Permalink

    Sets the minimum number of points (if >= 1.0) or the minimum proportion of points (if < 1.0) of a divisible cluster (default: 1).

    Sets the minimum number of points (if >= 1.0) or the minimum proportion of points (if < 1.0) of a divisible cluster (default: 1).

    Annotations
    @Since( "1.6.0" )
  38. def setSeed(seed: Long): BisectingKMeans.this.type

    Permalink

    Sets the random seed (default: hash value of the class name).

    Sets the random seed (default: hash value of the class name).

    Annotations
    @Since( "1.6.0" )
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped