www.gusucode.com > stats 源码程序 matlab案例代码 > stats/EstimateClassificationError1Example.m

    %% Estimate Classification Error
%%
% Load Fisher's iris data set.
load fisheriris
%%
% Boost 100 classification trees using AdaBoostM2.
ens = fitensemble(meas,species,'AdaBoostM2',100,'Tree');
%%
% Estimate the classification error of the model using the training
% observations.
L = loss(ens,meas,species)
%%
% Alternatively, if |ens| is not compact, then you can estimate the 
% training-sample classification error by passing |ens| to |resubLoss|.