From d88afabdfa83be47f36d833105aadd6b818ceeee Mon Sep 17 00:00:00 2001 From: Zheng RuiFeng Date: Wed, 11 May 2016 12:49:41 +0200 Subject: [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 Closes #12927 from zhengruifeng/lda_pe. --- docs/ml-clustering.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') 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 %} - +
+ +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 %} +
+ ## Bisecting k-means -- cgit v1.2.3