[scikit-learn] Decision Tree Regressor - DepthFirstTreeBuilder vs BestFirstTreeBuilder

hanzi mao hzmao at hotmail.com
Thu Sep 21 16:38:33 EDT 2017


Hi,


I am reading the source code of the Decision Tree Regressor in sklearn. To build a tree, there are two fashions: depth first and best first.  Best first fashion is adopted only when user set max_leaf_nodes. Otherwise, the tree will be built using the DepthFirstTreeBuilder. My questions are:


  1.  Are there any practical considerations when to use depth-first or best-first? Dose the depth-first fashion has a overwhelming advantage / popularity compared with the best-first one which makes it a default choice?
  2.  I am kind of confused why using a optional parameter max_leaf_nodes  to decide whether to use BestFirstTreeBuilder or not. I am wondering if there are some considerations when you decide to develop like this.

Thanks!

Best,
Hanna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170921/cba0f347/attachment.html>


More information about the scikit-learn mailing list