diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2016-02-11 15:53:45 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2016-02-11 15:53:45 -0800 |
commit | 2426eb3e167fece19831070594247e9481dbbe2a (patch) | |
tree | 088a6165c0c5822d6876714bc7ba121310b794c1 /python/pyspark/ml/clustering.py | |
parent | c8f667d7c1a0b02685e17b6f498879b05ced9b9d (diff) | |
download | spark-2426eb3e167fece19831070594247e9481dbbe2a.tar.gz spark-2426eb3e167fece19831070594247e9481dbbe2a.tar.bz2 spark-2426eb3e167fece19831070594247e9481dbbe2a.zip |
[MINOR][ML][PYSPARK] Cleanup test cases of clustering.py
Test cases should be removed from annotation of ```setXXX``` function, otherwise it will be parts of [Python API docs](https://spark.apache.org/docs/latest/api/python/pyspark.ml.html#pyspark.ml.clustering.KMeans.setInitMode).
cc mengxr jkbradley
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #10975 from yanboliang/clustering-cleanup.
Diffstat (limited to 'python/pyspark/ml/clustering.py')
-rw-r--r-- | python/pyspark/ml/clustering.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/python/pyspark/ml/clustering.py b/python/pyspark/ml/clustering.py index 60d1c9aaec..12afb88563 100644 --- a/python/pyspark/ml/clustering.py +++ b/python/pyspark/ml/clustering.py @@ -113,10 +113,6 @@ class KMeans(JavaEstimator, HasFeaturesCol, HasPredictionCol, HasMaxIter, HasTol def setK(self, value): """ Sets the value of :py:attr:`k`. - - >>> algo = KMeans().setK(10) - >>> algo.getK() - 10 """ self._paramMap[self.k] = value return self @@ -132,13 +128,6 @@ class KMeans(JavaEstimator, HasFeaturesCol, HasPredictionCol, HasMaxIter, HasTol def setInitMode(self, value): """ Sets the value of :py:attr:`initMode`. - - >>> algo = KMeans() - >>> algo.getInitMode() - 'k-means||' - >>> algo = algo.setInitMode("random") - >>> algo.getInitMode() - 'random' """ self._paramMap[self.initMode] = value return self @@ -154,10 +143,6 @@ class KMeans(JavaEstimator, HasFeaturesCol, HasPredictionCol, HasMaxIter, HasTol def setInitSteps(self, value): """ Sets the value of :py:attr:`initSteps`. - - >>> algo = KMeans().setInitSteps(10) - >>> algo.getInitSteps() - 10 """ self._paramMap[self.initSteps] = value return self |