Github user yinxusen commented on the pull request:

    https://github.com/apache/spark/pull/8972#issuecomment-163206656
  
    @jayantshekhar 
    
    1. Agree with @dbtsai I prefer to use `KMeansModel` in ML package directly 
other than `MLlibKMeans` here.
    
    2. I think it's better to define a sharedParam, so we can use the 
`initialModel` for all `Estimator`s.
    
    ```scala
    val initialModel: Param[Option[Model[_]]] =
      new Param(this, "initialModel", "initial model for warm-start")
    
    /** @group getParam */
    def getInitialModel: Option[Model[_]] = $(initialModel)
    ```
    
    We can check the type of model equals to the model of `Estimator` later in 
setter and fit() method.
    
    Or, 3. If we insist on making it type safe here, I recommend to use 
`Param[Option[KMeansModel]]` as the initial model, with `None` as the default 
value.


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