aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorZheng RuiFeng <ruifengz@foxmail.com>2016-11-15 15:44:50 +0100
committerSean Owen <sowen@cloudera.com>2016-11-15 15:44:50 +0100
commit33be4da5391b884191c405ffbce7d382ea8a2f66 (patch)
tree8605ef86a9b4077b5d23d3bfeb2d1de975d2005d /examples
parentd89bfc92302424406847ac7a9cfca714e6b742fc (diff)
downloadspark-33be4da5391b884191c405ffbce7d382ea8a2f66.tar.gz
spark-33be4da5391b884191c405ffbce7d382ea8a2f66.tar.bz2
spark-33be4da5391b884191c405ffbce7d382ea8a2f66.zip
[SPARK-18427][DOC] Update docs of mllib.KMeans
## What changes were proposed in this pull request? 1,Remove `runs` from docs of mllib.KMeans 2,Add notes for `k` according to comments in sources ## How was this patch tested? existing tests Author: Zheng RuiFeng <ruifengz@foxmail.com> Closes #15873 from zhengruifeng/update_doc_mllib_kmeans.
Diffstat (limited to 'examples')
-rw-r--r--examples/src/main/python/mllib/k_means_example.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/src/main/python/mllib/k_means_example.py b/examples/src/main/python/mllib/k_means_example.py
index 5c397e62ef..d6058f4502 100644
--- a/examples/src/main/python/mllib/k_means_example.py
+++ b/examples/src/main/python/mllib/k_means_example.py
@@ -36,8 +36,7 @@ if __name__ == "__main__":
parsedData = data.map(lambda line: array([float(x) for x in line.split(' ')]))
# Build the model (cluster the data)
- clusters = KMeans.train(parsedData, 2, maxIterations=10,
- runs=10, initializationMode="random")
+ clusters = KMeans.train(parsedData, 2, maxIterations=10, initializationMode="random")
# Evaluate clustering by computing Within Set Sum of Squared Errors
def error(point):