Greetings. I have been following some of the tutorials online for Spark k-means clustering. I would like to be able to just "dump" all the cluster values and their centroids to text file so I can explore the data. I have the clusters as such:
val clusters = KMeans.train(parsedData, numClusters, numIterations) clusters res2: org.apache.spark.mllib.clustering.KMeansModel = org.apache.spark.mllib.clustering.KMeansModel@59de440b Is there a way to build something akin to a key value RDD that has the center as the key and the array of values associated with that center as the value? I don't see anything in the tutorials, API docs, or the "Learning" book for how to do this. Thank you