[SPARK-18279][DOC][ML][SPARKR] Add R examples to ML programming guide.
## What changes were proposed in this pull request? Add R examples to ML programming guide for the following algorithms as POC: * spark.glm * spark.survreg * spark.naiveBayes * spark.kmeans The four algorithms were added to SparkR since 2.0.0, more docs for algorithms added during 2.1 release cycle will be addressed in a separate follow-up PR. ## How was this patch tested? This is the screenshots of generated ML programming guide for ```GeneralizedLinearRegression```: ![image](https://cloud.githubusercontent.com/assets/1962026/20866403/babad856-b9e1-11e6-9984-62747801e8c4.png) Author: Yanbo Liang <ybliang8@gmail.com> Closes #16136 from yanboliang/spark-18279.
This commit is contained in:
parent
bdfe7f6746
commit
eb8dd68132
|
@ -389,6 +389,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.classificat
|
|||
|
||||
{% include_example python/ml/naive_bayes_example.py %}
|
||||
</div>
|
||||
|
||||
<div data-lang="r" markdown="1">
|
||||
|
||||
Refer to the [R API docs](api/R/spark.naiveBayes.html) for more details.
|
||||
|
||||
{% include_example naiveBayes r/ml.R %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -566,6 +574,13 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
|
|||
{% include_example python/ml/generalized_linear_regression_example.py %}
|
||||
</div>
|
||||
|
||||
<div data-lang="r" markdown="1">
|
||||
|
||||
Refer to the [R API docs](api/R/spark.glm.html) for more details.
|
||||
|
||||
{% include_example glm r/ml.R %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -755,6 +770,13 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
|
|||
{% include_example python/ml/aft_survival_regression.py %}
|
||||
</div>
|
||||
|
||||
<div data-lang="r" markdown="1">
|
||||
|
||||
Refer to the [R API docs](api/R/spark.survreg.html) for more details.
|
||||
|
||||
{% include_example survreg r/ml.R %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -86,6 +86,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.clustering.
|
|||
|
||||
{% include_example python/ml/kmeans_example.py %}
|
||||
</div>
|
||||
|
||||
<div data-lang="r" markdown="1">
|
||||
|
||||
Refer to the [R API docs](api/R/spark.kmeans.html) for more details.
|
||||
|
||||
{% include_example kmeans r/ml.R %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
## Latent Dirichlet allocation (LDA)
|
||||
|
|
Loading…
Reference in a new issue