You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Manoj Kumar (JIRA)" <ji...@apache.org> on 2016/06/23 23:44:16 UTC

[jira] [Comment Edited] (SPARK-14351) Optimize ImpurityAggregator for decision trees

    [ https://issues.apache.org/jira/browse/SPARK-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15335165#comment-15335165 ] 

Manoj Kumar edited comment on SPARK-14351 at 6/23/16 11:43 PM:
---------------------------------------------------------------

OK, so here are some benchmarks that validate your claims partially (All trained to maxDepth=30 and the auto feature selection strategy). The trend is that as the number of trees increase, it seems to have a higher impact. I'll see what I can optimize tomorrow.

|| n_tree ||  n_samples || n_features || totalTime ||  percent of total time spent in impurityCalculator || percent of total time spent in impurityStats ||
|1 |  10000 |  500 | 7.90 | 0.328% | 0.01%
|10 |  10000 |  500 | 7.67 | 1.3% | 0.12%
|100 |  10000 |  500 | 18.156 | 5.19% | 0.29%
|1 |  500 |  10000 | 7.1308 | 0.39% | 0.014%
|10 |  500 |  10000 | 7.5506 | 1.37% | 0.12%
|100 |  500 |  10000 | 17.61| 6.18% | 0.349%
|1 |  1000 |  1000 | 6.99 | 0.28% | 0.029%
|10 |  1000 |  1000 | 7.415  | 1.7% | 0.09%
|100 |  1000 |  1000 | 17.89 | 6.1% | 0.3%
|500 |  1000 |  1000 | 71.02 | 6.8% | 0.3%



was (Author: mechcoder):
OK, so here are some benchmarks that validate your claims partially (All trained to maxDepth=30 and the auto feature selection strategy). The trend is that as the number of trees increase, it seems to have a higher impact. I'll see what I can optimize tomorrow.

|| n_tree ||  n_samples || n_features || totalTime ||  percent of total time spent in impurityCalculator || percent of total time spent in impurityStats ||
|1 |  10000 |  500 | 7.90 | 0.328% | 0.01%
|10 |  10000 |  500 | 7.67 | 1.3% | 0.12%
|100 |  10000 |  500 | 18.156 | 5.19% | 0.29%
1 |  500 |  10000 | 7.1308 | 0.39% | 0.014%
|10 |  500 |  10000 | 7.5506 | 1.37% | 0.12%
|100 |  500 |  10000 | 17.61| 6.18% | 0.349%
|1 |  1000 |  1000 | 6.99 | 0.28% | 0.029%
|10 |  1000 |  1000 | 7.415  | 1.7% | 0.09%
|100 |  1000 |  1000 | 17.89 | 6.1% | 0.3%
|500 |  1000 |  1000 | 71.02 | 6.8% | 0.3%


> Optimize ImpurityAggregator for decision trees
> ----------------------------------------------
>
>                 Key: SPARK-14351
>                 URL: https://issues.apache.org/jira/browse/SPARK-14351
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>            Reporter: Joseph K. Bradley
>
> {{RandomForest.binsToBestSplit}} currently takes a large amount of time.  Based on some quick profiling, I believe a big chunk of this is spent in {{ImpurityAggregator.getCalculator}} (which seems to make unnecessary Array copies) and {{RandomForest.calculateImpurityStats}}.
> This JIRA is for:
> * Doing more profiling to confirm that unnecessary time is being spent in some of these methods.
> * Optimizing the implementation
> * Profiling again to confirm the speedups
> Local profiling for large enough examples should suffice, especially since the optimizations should not need to change the amount of data communicated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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