Agreed. 

On Jul 5, 2013, at 5:13 PM, Reynold Xin <notifications@github.com> wrote:

> In mllib/src/main/scala/spark/ml/clustering/KMeans.scala:
> 
> > +                .setInitializationMode(initializationMode)
> > +                .train(data)
> > +  }
> > +
> > +  def train(data: RDD[Array[Double]], k: Int, maxIterations: Int, runs: Int): KMeansModel = {
> > +    train(data, k, maxIterations, runs, K_MEANS_PARALLEL)
> > +  }
> > +
> > +  def train(data: RDD[Array[Double]], k: Int, maxIterations: Int): KMeansModel = {
> > +    train(data, k, maxIterations, 1, K_MEANS_PARALLEL)
> > +  }
> > +
> > +  /**
> > +   * Return the index of the closest point in `centers` to `point`, as well as its distance.
> > +   */
> > +  private[mllib] def findClosest(centers: Array[Array[Double]], point: Array[Double])
> Can create a "view" to do that to skip the extra collection - but I think the current way is fine as is.
> 
> —
> Reply to this email directly or view it on GitHub.