You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by yanboliang <gi...@git.apache.org> on 2016/10/10 15:07:04 UTC

[GitHub] spark pull request #15342: [SPARK-11560] [MLLIB] Optimize KMeans implementat...

Github user yanboliang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15342#discussion_r82619472
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala ---
    @@ -43,21 +43,21 @@ import org.apache.spark.util.random.XORShiftRandom
     class KMeans private (
         private var k: Int,
         private var maxIterations: Int,
    -    private var runs: Int,
         private var initializationMode: String,
         private var initializationSteps: Int,
         private var epsilon: Double,
         private var seed: Long) extends Serializable with Logging {
     
       /**
    -   * Constructs a KMeans instance with default parameters: {k: 2, maxIterations: 20, runs: 1,
    +   * Constructs a KMeans instance with default parameters: {k: 2, maxIterations: 20,
        * initializationMode: "k-means||", initializationSteps: 2, epsilon: 1e-4, seed: random}.
        */
       @Since("0.8.0")
    -  def this() = this(2, 20, 1, KMeans.K_MEANS_PARALLEL, 2, 1e-4, Utils.random.nextLong())
    +  def this() = this(2, 20, KMeans.K_MEANS_PARALLEL, 2, 1e-4, Utils.random.nextLong())
     
       /**
    -   * Number of clusters to create (k).
    +   * Number of clusters to create (k). Note that if the input has fewer than k elements,
    +   * then it's possible that fewer than k clusters are created.
    --- End diff --
    
    If we back out change to avoid duplicate centroids, does this annotation be invalid?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org