April 2017
Intermediate to advanced
532 pages
12h 39m
English
In this section, we evaluate the effect or iterations on WSSSE for bisecting the K-means algorithm.
The source code is:
object BisectingKMeansMetrics { case class RatingX(userId: Int, movieId: Int, rating: Float, timestamp: Long) val DATA_PATH= "../../../data/ml-100k" val PATH_MOVIES = DATA_PATH + "/u.item" val dataSetUsers = null def main(args: Array[String]): Unit = { val spConfig = ( new SparkConf).setMaster("local[1]").setAppName("SparkApp"). set("spark.driver.allowMultipleContexts", "true") val spark = SparkSession .builder() .appName("Spark SQL Example") .config(spConfig) .getOrCreate() val datasetUsers = spark.read.format("libsvm").load( "./data/movie_lens_libsvm/movie_lens_users_libsvm/part-Read now
Unlock full access