aboutsummaryrefslogtreecommitdiff
path: root/docs/ml-classification-regression.md
diff options
context:
space:
mode:
authorYanbo Liang <ybliang8@gmail.com>2016-12-08 06:19:38 -0800
committerYanbo Liang <ybliang8@gmail.com>2016-12-08 06:19:38 -0800
commit9bf8f3cd4f62f921c32fb50b8abf49576a80874f (patch)
tree37a11c334001a981d5a87c5d0fefec67d2ef4889 /docs/ml-classification-regression.md
parentb47b892e4579b7b06b4b2837ee4b614e517789f9 (diff)
downloadspark-9bf8f3cd4f62f921c32fb50b8abf49576a80874f.tar.gz
spark-9bf8f3cd4f62f921c32fb50b8abf49576a80874f.tar.bz2
spark-9bf8f3cd4f62f921c32fb50b8abf49576a80874f.zip
[SPARK-18325][SPARKR][ML] SparkR ML wrappers example code and user guide
## What changes were proposed in this pull request? * Add all R examples for ML wrappers which were added during 2.1 release cycle. * Split the whole ```ml.R``` example file into individual example for each algorithm, which will be convenient for users to rerun them. * Add corresponding examples to ML user guide. * Update ML section of SparkR user guide. Note: MLlib Scala/Java/Python examples will be consistent, however, SparkR examples may different from them, since R users may use the algorithms in a different way, for example, using R ```formula``` to specify ```featuresCol``` and ```labelCol```. ## How was this patch tested? Run all examples manually. Author: Yanbo Liang <ybliang8@gmail.com> Closes #16148 from yanboliang/spark-18325.
Diffstat (limited to 'docs/ml-classification-regression.md')
-rw-r--r--docs/ml-classification-regression.md67
1 files changed, 64 insertions, 3 deletions
diff --git a/docs/ml-classification-regression.md b/docs/ml-classification-regression.md
index bb9390fd82..782ee58188 100644
--- a/docs/ml-classification-regression.md
+++ b/docs/ml-classification-regression.md
@@ -75,6 +75,13 @@ More details on parameters can be found in the [Python API documentation](api/py
{% include_example python/ml/logistic_regression_with_elastic_net.py %}
</div>
+<div data-lang="r" markdown="1">
+
+More details on parameters can be found in the [R API documentation](api/R/spark.logit.html).
+
+{% include_example binomial r/ml/logit.R %}
+</div>
+
</div>
The `spark.ml` implementation of logistic regression also supports
@@ -171,6 +178,13 @@ model with elastic net regularization.
{% include_example python/ml/multiclass_logistic_regression_with_elastic_net.py %}
</div>
+<div data-lang="r" markdown="1">
+
+More details on parameters can be found in the [R API documentation](api/R/spark.logit.html).
+
+{% include_example multinomial r/ml/logit.R %}
+</div>
+
</div>
@@ -242,6 +256,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.classificat
{% include_example python/ml/random_forest_classifier_example.py %}
</div>
+
+<div data-lang="r" markdown="1">
+
+Refer to the [R API docs](api/R/spark.randomForest.html) for more details.
+
+{% include_example classification r/ml/randomForest.R %}
+</div>
+
</div>
## Gradient-boosted tree classifier
@@ -275,6 +297,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.classificat
{% include_example python/ml/gradient_boosted_tree_classifier_example.py %}
</div>
+
+<div data-lang="r" markdown="1">
+
+Refer to the [R API docs](api/R/spark.gbt.html) for more details.
+
+{% include_example classification r/ml/gbt.R %}
+</div>
+
</div>
## Multilayer perceptron classifier
@@ -324,6 +354,13 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.classificat
{% include_example python/ml/multilayer_perceptron_classification.py %}
</div>
+<div data-lang="r" markdown="1">
+
+Refer to the [R API docs](api/R/spark.mlp.html) for more details.
+
+{% include_example r/ml/mlp.R %}
+</div>
+
</div>
@@ -400,7 +437,7 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.classificat
Refer to the [R API docs](api/R/spark.naiveBayes.html) for more details.
-{% include_example naiveBayes r/ml.R %}
+{% include_example r/ml/naiveBayes.R %}
</div>
</div>
@@ -584,7 +621,7 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
Refer to the [R API docs](api/R/spark.glm.html) for more details.
-{% include_example glm r/ml.R %}
+{% include_example r/ml/glm.R %}
</div>
</div>
@@ -656,6 +693,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
{% include_example python/ml/random_forest_regressor_example.py %}
</div>
+
+<div data-lang="r" markdown="1">
+
+Refer to the [R API docs](api/R/spark.randomForest.html) for more details.
+
+{% include_example regression r/ml/randomForest.R %}
+</div>
+
</div>
## Gradient-boosted tree regression
@@ -689,6 +734,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
{% include_example python/ml/gradient_boosted_tree_regressor_example.py %}
</div>
+
+<div data-lang="r" markdown="1">
+
+Refer to the [R API docs](api/R/spark.gbt.html) for more details.
+
+{% include_example regression r/ml/gbt.R %}
+</div>
+
</div>
@@ -780,7 +833,7 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
Refer to the [R API docs](api/R/spark.survreg.html) for more details.
-{% include_example survreg r/ml.R %}
+{% include_example r/ml/survreg.R %}
</div>
</div>
@@ -853,6 +906,14 @@ Refer to the [`IsotonicRegression` Python docs](api/python/pyspark.ml.html#pyspa
{% include_example python/ml/isotonic_regression_example.py %}
</div>
+
+<div data-lang="r" markdown="1">
+
+Refer to the [`IsotonicRegression` R API docs](api/R/spark.isoreg.html) for more details on the API.
+
+{% include_example r/ml/isoreg.R %}
+</div>
+
</div>
# Linear methods