Database Reference
In-Depth Information
org.apache.spark.mllib.clustering.KMeansModel =
org.apache.spark.mllib.clustering.KMeansModel@6bb28fb5
Tip
Notice that when we use a lower number of iterations but use multiple training runs, we
typically get a training error (called cost above) that is very similar to the one we obtain
by running the model to convergence. Using the multiple runs option can, therefore, be a
very effective method to find the best possible model.
Finally, we will also train a K-means model on the user factor vectors:
val userClusterModel = KMeans.train(userVectors,
numClusters, numIterations, numRuns)
Search WWH ::




Custom Search