Skip to content

Chapter 12: K-Means Clustering

Programs of chapter 12 of the book Data Algorithms (O'Reilly, 2015), running on Spark 4.3.0.

Sample input: data/chap12/points.txt

Run the commands from the repository folder after building the jar (Running the programs).

Spark (Scala)

chap12.scala.ScalaKMeans

Source: ScalaKMeans.scala

scripts/run_spark.sh org.dataalgorithms.chap12.scala.ScalaKMeans data/chap12/points.txt 2 10