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

    https://github.com/apache/spark/pull/6737#discussion_r33600204
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala ---
    @@ -156,6 +156,23 @@ class KMeans private (
         this
       }
     
    +  // Initial cluster centers can be provided as a KMeansModel object 
rather than using the
    +  // random or k-means|| initializationMode
    +  private var initialModel: Option[KMeansModel] = None
    +
    +  /**
    +   * Set the initial starting point, bypassing the random initialization 
or k-means||
    +   * The condition model.k == this.k must be met, and only one run is 
allowed;
    +   * failure in either case will result in an IllegalArgumentException.
    +   */
    +  def setInitialModel(model: KMeansModel): this.type = {
    +    require(model.k == k, "mismatched cluster count")
    +    this.setRuns(1)
    --- End diff --
    
    Remove this line please.  Let's leave the value set to 1, and just ignore 
it.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to