Decision/Regression stumps using ClassificationTree.template or RegressionTree.template
2 views (last 30 days)
Show older comments
I wonder if it is possible to control the number of splits that the fitensemble function is allowed to make for each single tree. I have looked at the ClassificationTree.template but have not found how number of splits are controlled. How would I set up ClassificationTree.template if for example stumps were desired?
0 Comments
Accepted Answer
Ilya
on 11 Oct 2011
You get stumps by default for any boosting algorithm from fitensemble. Or, equivalently, you can set 'minparent' to the number of observations, as you noted. The trees are saved in the Trained property. You can inspect them by executing view method, for example, view(ens.Trained{1}).
For anything other than stump, you can control the number of splits approximately by minleaf or minparent arguments. I haven't seen a case where controlling the number of splits would produce a better accuracy for the overall ensemble than controlling the leaf size.
0 Comments
More Answers (2)
See Also
Categories
Find more on Classification Ensembles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!