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

    https://github.com/apache/spark/pull/4951#discussion_r26083656
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala ---
    @@ -58,4 +66,59 @@ class KMeansModel (val clusterCenters: Array[Vector]) 
extends Serializable {
     
       private def clusterCentersWithNorm: Iterable[VectorWithNorm] =
         clusterCenters.map(new VectorWithNorm(_))
    +
    +  override def save(sc: SparkContext, path: String): Unit = {
    +    KMeansModel.SaveLoadV1_0.save(sc, this, path)
    +  }
    +
    +  override protected def formatVersion: String = "1.0"
    +}
    +
    +object KMeansModel extends Loader[KMeansModel] {
    +  override def load(sc: SparkContext, path: String): KMeansModel = {
    +    KMeansModel.SaveLoadV1_0.load(sc, path)
    +  }
    +
    +  case class IndexedPoint(id: Int, point: Vector)
    --- End diff --
    
    How about using `Int` here to represent indexes? I think there is no need 
to use `Long`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to