Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Smart Thermostat AWS Spark - part Spark cluster kmeans
val RDDscore = => result._2).map(result => Vectors.dense(result._1,result._2))
//use mllib k-means clustering to create clusters (temperature groups)
val numClusters = 10
val numIterations = 200
val clusters = KMeans.train(RDDscore, numClusters, numIterations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment