From 8beae59144827d81491eed385dc2aa6aedd6a7b4 Mon Sep 17 00:00:00 2001 From: Zheng RuiFeng Date: Wed, 11 May 2016 10:01:43 +0200 Subject: [SPARK-15149][EXAMPLE][DOC] update kmeans example ## What changes were proposed in this pull request? Python example for ml.kmeans already exists, but not included in user guide. 1,small changes like: `example_on` `example_off` 2,add it to user guide 3,update examples to directly read datafile ## How was this patch tested? manual tests `./bin/spark-submit examples/src/main/python/ml/kmeans_example.py Author: Zheng RuiFeng Closes #12925 from zhengruifeng/km_pe. --- docs/ml-clustering.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/ml-clustering.md') diff --git a/docs/ml-clustering.md b/docs/ml-clustering.md index 1245b8bbc8..876a280c4c 100644 --- a/docs/ml-clustering.md +++ b/docs/ml-clustering.md @@ -79,6 +79,11 @@ Refer to the [Java API docs](api/java/org/apache/spark/ml/clustering/KMeans.html {% include_example java/org/apache/spark/examples/ml/JavaKMeansExample.java %} +
+Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.clustering.KMeans) for more details. + +{% include_example python/ml/kmeans_example.py %} +
-- cgit v1.2.3