How can I prune the weak learners in an ensemble learner?
Show older comments
The fitensemble method doesn't seem to provide a method for actually pruning the weak learners that comprise it. I understand accuracy may not be improved by doing so, but in my usage space is at a premium, so I'd like to reduce the number of nodes in the trees used as my weak learners -- or at least be able to experiment with the effect that has. And I'm interested in reducing the number of nodes not just by adjusting the "leafiness" via the MinLeaf and MinParent settings, but also use pruning.
Note that enabling "Prune" in the templateTree used as my weak learner does not seem to actually do any pruning, but merely computes the PruneList. However, not only do the CompactClassificationTrees that are my weak learners (inexplicably) lack a prune method, even though they have a PruneList, but also, they are protected members of the ensemble and thus not adjustable anyway.
So how can I prune my weak learners after creating an ensemble?
Accepted Answer
More Answers (1)
Daniel Vieira
on 10 Aug 2017
0 votes
I'm having a similar problem, it appears this doesn't work anymore on 2017a.
1 Comment
@Daniel: Please do not highjack an existing thread by posting a new question as a pseudo-answer. Open a new thread and add a link to this one, if this is useful. Add an explanation, what "doesn't work" mean. It is easier to solve a problem than to guess, what the problem is. Then delete your answer here. Thanks.
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!