fitted {SparkR}R Documentation

Get fitted result from a k-means model

Description

Get fitted result from a k-means model, similarly to R's fitted(). Note: A saved-loaded model does not support this method.

Usage

fitted(object, ...)

## S4 method for signature 'KMeansModel'
fitted(object, method = c("centers", "classes"), ...)

Arguments

object

A fitted k-means model

Value

SparkDataFrame containing fitted values

Examples

## Not run: 
##D model <- spark.kmeans(trainingData, ~ ., 2)
##D fitted.model <- fitted(model)
##D showDF(fitted.model)
## End(Not run)

[Package SparkR version 2.0.0 Index]