| predict {SparkR} | R Documentation | 
Makes predictions from a generalized linear model produced by glm() or spark.glm(), similarly to R's predict().
Makes predictions from a model produced by spark.naiveBayes(), similarly to R package e1071's predict.
Make predictions from a model produced by spark.kmeans().
Make predictions from a model produced by spark.survreg(), similarly to R package survival's predict.
predict(object, ...) ## S4 method for signature 'GeneralizedLinearRegressionModel' predict(object, newData) ## S4 method for signature 'NaiveBayesModel' predict(object, newData) ## S4 method for signature 'KMeansModel' predict(object, newData) ## S4 method for signature 'AFTSurvivalRegressionModel' predict(object, newData)
object | 
 A fitted generalized linear model  | 
newData | 
 SparkDataFrame for testing  | 
object | 
 A fitted naive Bayes model  | 
newData | 
 SparkDataFrame for testing  | 
object | 
 A fitted k-means model  | 
newData | 
 SparkDataFrame for testing  | 
object | 
 A fitted AFT survival regression model  | 
newData | 
 SparkDataFrame for testing  | 
SparkDataFrame containing predicted labels in a column named "prediction"
SparkDataFrame containing predicted labels in a column named "prediction"
SparkDataFrame containing predicted labels in a column named "prediction"
SparkDataFrame containing predicted labels in a column named "prediction"
## Not run: 
##D model <- glm(y ~ x, trainingData)
##D predicted <- predict(model, testData)
##D showDF(predicted)
## End(Not run)
## Not run: 
##D model <- spark.naiveBayes(trainingData, y ~ x)
##D predicted <- predict(model, testData)
##D showDF(predicted)
## End(Not run)
## Not run: 
##D model <- spark.kmeans(trainingData, ~ ., 2)
##D predicted <- predict(model, testData)
##D showDF(predicted)
## End(Not run)
## Not run: 
##D model <- spark.survreg(trainingData, Surv(futime, fustat) ~ ecog_ps + rx)
##D predicted <- predict(model, testData)
##D showDF(predicted)
## End(Not run)