aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/main/scala/org
diff options
context:
space:
mode:
authorXiangrui Meng <meng@databricks.com>2015-11-02 13:42:16 -0800
committerXiangrui Meng <meng@databricks.com>2015-11-02 13:42:16 -0800
commit33ae7a35daa86c34f1f9f72f997e0c2d4cd8abec (patch)
tree4cc98ff3c4c79558495ac676d92eb63c038998b2 /mllib/src/main/scala/org
parentb3aedca6b55c678e40a5961e2fd3af4cb8c52bba (diff)
downloadspark-33ae7a35daa86c34f1f9f72f997e0c2d4cd8abec.tar.gz
spark-33ae7a35daa86c34f1f9f72f997e0c2d4cd8abec.tar.bz2
spark-33ae7a35daa86c34f1f9f72f997e0c2d4cd8abec.zip
[SPARK-11358][MLLIB] deprecate runs in k-means
This PR deprecates `runs` in k-means. `runs` introduces extra complexity and overhead in MLlib's k-means implementation. I haven't seen much usage with `runs` not equal to `1`. We don't have a unit test for it either. We can deprecate this method in 1.6, and void it in 1.7. It helps us simplify the implementation. cc: srowen Author: Xiangrui Meng <meng@databricks.com> Closes #9322 from mengxr/SPARK-11358.
Diffstat (limited to 'mllib/src/main/scala/org')
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala b/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala
index 7168aac32c..2895db7c90 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala
@@ -107,7 +107,7 @@ class KMeans private (
* Number of runs of the algorithm to execute in parallel.
*/
@Since("1.4.0")
- @Experimental
+ @deprecated("Support for runs is deprecated. This param will have no effect in 1.7.0.", "1.6.0")
def getRuns: Int = runs
/**
@@ -117,7 +117,7 @@ class KMeans private (
* return the best clustering found over any run. Default: 1.
*/
@Since("0.8.0")
- @Experimental
+ @deprecated("Support for runs is deprecated. This param will have no effect in 1.7.0.", "1.6.0")
def setRuns(runs: Int): this.type = {
if (runs <= 0) {
throw new IllegalArgumentException("Number of runs must be positive")