Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/18067#discussion_r118411791
--- Diff: R/pkg/vignettes/sparkr-vignettes.Rmd ---
@@ -776,6 +778,20 @@ newDF <- createDataFrame(data.frame(x = c(1.5, 3.2)))
head(predict(isoregModel, newDF))
```
+#### Decision Tree
+
+`spark.decisionTree` fits a [decision
tree](https://en.wikipedia.org/wiki/Decision_tree_learning) classification or
regression model on a `SparkDataFrame`.
+Users can call `summary` to get a summary of the fitted model, `predict`
to make predictions, and `write.ml`/`read.ml` to save/load fitted models.
+
+We use the `longley` dataset to train a decision tree and make predictions:
+
+```{r}
+df <- createDataFrame(longley)
--- End diff --
as commented, before, please check. I'm pretty sure
`createDataFrame(longley)` will cause a warning
```
longley
GNP.deflator GNP Unemployed Armed.Forces Population Year Employed
1947 83.0 234.289 235.6 159.0 107.608 1947 60.323
1948 88.5 259.426 232.5 145.6 108.632 1948 61.122
```
so our options are:
- don't use longley (my earlier suggestion)
- use longley but keep `warning=FALSE`
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]