diff options
author | GayathriMurali <gayathri.m@intel.com> | 2016-06-17 21:10:29 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2016-06-17 21:10:29 -0700 |
commit | af2a4b0826b2358c0fe75c3e4d7fd8f7bccdd8e5 (patch) | |
tree | b251b61bb5e19bce2345e9846b975fd2a25e0e3f /examples/src/main | |
parent | 10b671447bc04af250cbd8a7ea86f2769147a78a (diff) | |
download | spark-af2a4b0826b2358c0fe75c3e4d7fd8f7bccdd8e5.tar.gz spark-af2a4b0826b2358c0fe75c3e4d7fd8f7bccdd8e5.tar.bz2 spark-af2a4b0826b2358c0fe75c3e4d7fd8f7bccdd8e5.zip |
[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 <gayathri.m@intel.com>
Closes #13285 from GayathriMurali/SPARK-15129.
Diffstat (limited to 'examples/src/main')
-rw-r--r-- | examples/src/main/r/ml.R | 4 |
1 files changed, 2 insertions, 2 deletions
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) |