org.apache.spark.examples.mllib

PowerIterationClusteringExample

object PowerIterationClusteringExample

An example Power Iteration Clustering http://www.icml2010.org/papers/387.pdf app. Takes an input of K concentric circles and the number of points in the innermost circle. The output should be K clusters - each cluster containing precisely the points associated with each of the input circles.

Run with

./bin/run-example mllib.PowerIterationClusteringExample [options]

Where options include:
  k:  Number of circles/clusters
  n:  Number of sampled points on innermost circle.. There are proportionally more points
     within the outer/larger circles
  maxIterations:   Number of Power Iterations

Here is a sample run and output:

./bin/run-example mllib.PowerIterationClusteringExample -k 2 --n 10 --maxIterations 15

Cluster assignments: 1 -> [0,1,2,3,4,5,6,7,8,9], 0 -> [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]

If you use it as a template to create your own app, please use spark-submit to submit your app.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PowerIterationClusteringExample
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Params(k: Int = 2, numPoints: Int = 10, maxIterations: Int = 15) extends AbstractParams[Params] with Product with Serializable

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def gaussianSimilarity(p1: (Double, Double), p2: (Double, Double)): Double

    Gaussian Similarity: http://en.

    Gaussian Similarity: http://en.wikipedia.org/wiki/Radial_basis_function_kernel

  12. def generateCircle(radius: Double, n: Int): Seq[(Double, Double)]

  13. def generateCirclesRdd(sc: SparkContext, nCircles: Int, nPoints: Int): RDD[(Long, Long, Double)]

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def main(args: Array[String]): Unit

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def run(params: Params): Unit

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped