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

    https://github.com/apache/spark/pull/117#discussion_r10775121
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala ---
    @@ -114,27 +126,60 @@ class KMeans private (
        * performance, because this is an iterative algorithm.
        */
       def run(data: RDD[Array[Double]]): KMeansModel = {
    -    // TODO: check whether data is persistent; this needs RDD.storageLevel 
to be publicly readable
    +    run(data.map(v => Vectors.dense(v)))
    +  }
    +
    +  /**
    +   * Train a K-means model on the given set of points; `data` should be 
cached for high
    +   * performance, because this is an iterative algorithm.
    +   */
    +  def run(data: RDD[Vector])(implicit d: DummyImplicit): KMeansModel = {
    --- End diff --
    
    If the implicit is done to deal with type erasure on RDDs of different 
forms, that's not a great solution. We might instead rename the old method that 
ran on arrays, or give this one a different name.


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

Reply via email to