<h4 dir="auto">Description</h4>
<p dir="auto"><code class="notranslate">DecisionTreeClassifier</code> builds overtly complicated trees (assuming <code class="notranslate">splitter=’best’</code>) as on the example below. The tree used as an example could be easily pruned to two decision nodes. Pruning wouldn't affect the results when using <code class="notranslate">splitter=’best’</code>, but would improve readability of the results (and possibly performance, since smaller number of decisions need to be made) to great extent.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3750140/37406305-290b0b5e-2797-11e8-8cb9-acaa195d4806.png"><img src="https://user-images.githubusercontent.com/3750140/37406305-290b0b5e-2797-11e8-8cb9-acaa195d4806.png" alt="tree" style="max-width: 100%;"></a></p>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">The pruning could happen either automatically, on the stage of building the tree, or via external <code class="notranslate">prune()</code> function. I guess that someone could argue that setting the <code class="notranslate">splitter</code> argument should not affect how the tree is build and otherwise it could be seen as inconsistent behaviour, but this souldn't be a problem if it was properly documented.</p>
<p dir="auto">I frequently get asked about post-pruning. Often using single trees is important for interpretability, and post-pruning can help both interpretability and generalization performance.<br>
[I'm surprised there is no open issue on this, but I couldn't find one]</p>