powered by
Get fitted result from a k-means model, similarly to R's fitted(). Note: A saved-loaded model does not support this method.
fitted(object, ...)# S4 method for KMeansModel fitted(object, method = c("centers", "classes"))
# S4 method for KMeansModel fitted(object, method = c("centers", "classes"))
a fitted k-means model.
additional argument(s) passed to the method.
type of fitted results, "centers" for cluster centers or "classes" for assigned classes.
"centers"
"classes"
fitted returns a SparkDataFrame containing fitted values.
fitted
# NOT RUN { model <- spark.kmeans(trainingData, ~ ., 2) fitted.model <- fitted(model) showDF(fitted.model) # }
Run the code above in your browser using DataLab