Hello,
There is this method TreeBagger.combine that can combine two independently trained TreeBagger classifiers.
The problem is that I have to combine two ensembles, but I want to replace randomly 25% of the trees from the first ensemble with trees from the second ensemble.
Three possible solutions to overcome my problem:
1. Method to remove specified trees from ensemble. Then I would just remove 25% of the ensemble with random indexes and combine with the second ensemble.
2. Method to construct new TreeBagger from a collection of trees. For example something like this:
TreeBagger=Construct(Tree1, Tree2, ...);
3. Method to replace trees in TreeBagger ensemble. For example I tried to do this, like in a structure:
ensemble.Trees{i}=new_tree;
but that didn't work, because the property is private.
Please help me, because I had no progress with any of three…
Best Answer