MATLAB: How to get the classification rules of an ensemble

classificationStatistics and Machine Learning Toolbox

Hi.
I'm using fitensemble to train an AdaBoostM2 classifier. My question is – how can I see what each weak classifier actually does?
Vadim.

Best Answer

Here is an example:
load fisheriris
ens = fitensemble(meas,species,'AdaBoostM2',100,'Tree');
You can find all the trained classification tree models here:
ens.Trained
Access them individually as follows:
ens.Trained{1}
Take a look at their properties and methods for more information.