diff options
author | Zheng RuiFeng <ruifengz@foxmail.com> | 2016-05-11 12:49:41 +0200 |
---|---|---|
committer | Nick Pentreath <nickp@za.ibm.com> | 2016-05-11 12:49:41 +0200 |
commit | d88afabdfa83be47f36d833105aadd6b818ceeee (patch) | |
tree | 224f8a6fc5268e30bf200ab30f4e20f5c0164b34 /docs/ml-clustering.md | |
parent | fafc95af79fa34f82964a86407c2ee046eda3814 (diff) | |
download | spark-d88afabdfa83be47f36d833105aadd6b818ceeee.tar.gz spark-d88afabdfa83be47f36d833105aadd6b818ceeee.tar.bz2 spark-d88afabdfa83be47f36d833105aadd6b818ceeee.zip |
[SPARK-15150][EXAMPLE][DOC] Update LDA examples
## What changes were proposed in this pull request?
1,create a libsvm-type dataset for lda: `data/mllib/sample_lda_libsvm_data.txt`
2,add python example
3,directly read the datafile in examples
4,BTW, change to `SparkSession` in `aft_survival_regression.py`
## How was this patch tested?
manual tests
`./bin/spark-submit examples/src/main/python/ml/lda_example.py`
Author: Zheng RuiFeng <ruifengz@foxmail.com>
Closes #12927 from zhengruifeng/lda_pe.
Diffstat (limited to 'docs/ml-clustering.md')
-rw-r--r-- | docs/ml-clustering.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/ml-clustering.md b/docs/ml-clustering.md index 876a280c4c..0d69bf67df 100644 --- a/docs/ml-clustering.md +++ b/docs/ml-clustering.md @@ -109,8 +109,13 @@ Refer to the [Java API docs](api/java/org/apache/spark/ml/clustering/LDA.html) f {% include_example java/org/apache/spark/examples/ml/JavaLDAExample.java %} </div> -</div> +<div data-lang="python" markdown="1"> + +Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.clustering.LDA) for more details. +{% include_example python/ml/lda_example.py %} +</div> +</div> ## Bisecting k-means |