Vincent created SPARK-22096:
-------------------------------

             Summary: use aggregateByKeyLocally to save one stage in 
calculating ItemFrequency in NaiveBayes
                 Key: SPARK-22096
                 URL: https://issues.apache.org/jira/browse/SPARK-22096
             Project: Spark
          Issue Type: Improvement
          Components: ML
    Affects Versions: 2.2.0
            Reporter: Vincent
            Priority: Minor


NaiveBayes currently takes aggreateByKey followed by a collect to calculate 
frequency for each feature/label. We can implement a new function 
'aggregateByKeyLocally' in RDD that merges locally on each mapper before 
sending results to a reducer to save one stage.
We tested on NaiveBayes and see ~20% performance gain with these changes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to