spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felixcheung <>
Subject [GitHub] spark pull request #17032: [SPARK-19460][SparkR]:Update dataset used in R do...
Date Thu, 23 Feb 2017 19:09:21 GMT
Github user felixcheung commented on a diff in the pull request:
    --- Diff: examples/src/main/r/ml/glm.R ---
    @@ -25,11 +25,12 @@ library(SparkR)
     sparkR.session(appName = "SparkR-ML-glm-example")
     # $example on$
    -irisDF <- suppressWarnings(createDataFrame(iris))
    +t <-
    +training <- createDataFrame(t)
     # Fit a generalized linear model of family "gaussian" with spark.glm
    -gaussianDF <- irisDF
    -gaussianTestDF <- irisDF
    -gaussianGLM <- spark.glm(gaussianDF, Sepal_Length ~ Sepal_Width + Species, family
= "gaussian")
    +gaussianDF <- training
    +gaussianTestDF <- training
    --- End diff --
    I think this example is a bit weird - it takes the same data to build the model and then
predict with it.
    I suspect we are really limited in terms of how much data we have here, but we should
consider building a better example which include doing a randomSplit into training and test
set etc..

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message