aboutsummaryrefslogtreecommitdiff
path: root/docs/ml-clustering.md
diff options
context:
space:
mode:
authorZheng RuiFeng <ruifengz@foxmail.com>2016-05-11 10:01:43 +0200
committerNick Pentreath <nickp@za.ibm.com>2016-05-11 10:01:43 +0200
commit8beae59144827d81491eed385dc2aa6aedd6a7b4 (patch)
tree1905c4caa10c9f432262272e120a948772a2846f /docs/ml-clustering.md
parentcef73b563864d5f8aa1b26e31e3b9af6f0a08a5d (diff)
downloadspark-8beae59144827d81491eed385dc2aa6aedd6a7b4.tar.gz
spark-8beae59144827d81491eed385dc2aa6aedd6a7b4.tar.bz2
spark-8beae59144827d81491eed385dc2aa6aedd6a7b4.zip
[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 <ruifengz@foxmail.com> Closes #12925 from zhengruifeng/km_pe.
Diffstat (limited to 'docs/ml-clustering.md')
-rw-r--r--docs/ml-clustering.md5
1 files changed, 5 insertions, 0 deletions
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 %}
</div>
+<div data-lang="python" markdown="1">
+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 %}
+</div>
</div>