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

    https://github.com/apache/spark/pull/6737#discussion_r32103401
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala ---
    @@ -156,6 +156,26 @@ 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; failure will result 
in an
    +    * IllegalArgumentException.
    +    */
    +  def setInitialModel(model: KMeansModel): this.type = {
    --- End diff --
    
    @srowen Thanks for the comments. We followed this approach  based on 
@mengxr 's suggestion at 
https://issues.apache.org/jira/browse/SPARK-8018?focusedCommentId=14571757&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14571757.
 Please have a look. 


---
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