From af2a4b0826b2358c0fe75c3e4d7fd8f7bccdd8e5 Mon Sep 17 00:00:00 2001 From: GayathriMurali Date: Fri, 17 Jun 2016 21:10:29 -0700 Subject: [SPARK-15129][R][DOC] R API changes in ML ## What changes were proposed in this pull request? Make user guide changes to SparkR documentation for all changes that happened in 2.0 to Machine Learning APIs Author: GayathriMurali Closes #13285 from GayathriMurali/SPARK-15129. --- examples/src/main/r/ml.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/src/main/r/ml.R b/examples/src/main/r/ml.R index fd35936635..495f392c26 100644 --- a/examples/src/main/r/ml.R +++ b/examples/src/main/r/ml.R @@ -25,6 +25,7 @@ library(SparkR) sc <- sparkR.init(appName="SparkR-ML-example") sqlContext <- sparkRSQL.init(sc) +# $example on$ ############################ spark.glm and glm ############################################## irisDF <- suppressWarnings(createDataFrame(sqlContext, iris)) @@ -57,7 +58,6 @@ binomialPredictions <- predict(binomialGLM, binomialTestDF) showDF(binomialPredictions) ############################ spark.survreg ############################################## - # Use the ovarian dataset available in R survival package library(survival) @@ -121,7 +121,7 @@ gaussianGLM <- spark.glm(gaussianDF, Sepal_Length ~ Sepal_Width + Species, famil modelPath <- tempfile(pattern = "ml", fileext = ".tmp") write.ml(gaussianGLM, modelPath) gaussianGLM2 <- read.ml(modelPath) - +# $example off$ # Check model summary summary(gaussianGLM2) -- cgit v1.2.3