GitHub user dardelet opened a pull request:

    https://github.com/apache/spark/pull/18491

    [SPARK-21268][MLLIB] Move center calculations to a distributed map in KMeans

    ## What changes were proposed in this pull request?
    
    The scal() and creation of newCenter vector is done in the driver, after a 
collectAsMap operation while it could be done in the distributed RDD.
    This PR moves this code before the collectAsMap for more efficiency
    
    ## How was this patch tested?
    
    This was tested manually by running the KMeansExample and verifying that 
the new code ran without error and gave same output as before.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dardelet/spark 
move-center-calculation-to-distributed-map-kmean

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18491.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18491
    
----
commit 59d611295e877654d6fc61e9b28e26aec6e65450
Author: dardelet <guillaumeg...@gmail.com>
Date:   2017-06-30T15:38:12Z

    Move center of cluster's calculation to a distributed map

----


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