www.gusucode.com > stats 源码程序 matlab案例代码 > stats/CreateEnsembleLearningTemplateExample.m
%% Create an Ensemble Learning Template %% % Use |templateEnsemble| to specify an ensemble learning template. You % must specify the ensemble method, the number of learning cycles, and % the type of weak learners. For this example, specify the AdaBoostM1 % method, 100 learners, and classification tree weak learners. % Copyright 2015 The MathWorks, Inc. t = templateEnsemble('AdaBoostM1',100,'tree') %% % All properties of the template object are empty except for % |Method|, |Type|, |LearnerTemplates|, and |NLearn|. When trained on, % the software fills in the empty properties with their respective default % values. For example, the software fills the |LearnRate| property % with |1|. %% % |t| is a plan for an ensemble learner, and no computation takes place % when you specify it. You can pass |t| to <docid:stats_ug.bue3oc9 % fitcecoc> to specify ensemble binary learners for ECOC multiclass % learning.