www.gusucode.com > stats 源码程序 matlab案例代码 > stats/CreateDefaultNaiveBayesTemplateExample.m
%% Create a Default Naive Bayes Template %% % Use |templateNaiveBayes| to specify a default naive Bayes template. t = templateNaiveBayes() %% % All properties of the template object are empty except for % |Method| and |Type|. When you pass |t| to the training function, % the software fills in the empty properties with their respective default % values. For example, the software fills the |DistributionNames| property % with a 1-by- |D| cell array of character vectors with |'normal'| in each cell, where % |D| is the number of predictors. For details on other default values, % see <docid:stats_ug.budugq5-1 fitcnb>. %% % |t| is a plan for a naive Bayes learner, and no computation occurs % when you specify it. You can pass |t| to <docid:stats_ug.bue3oc9 % fitcecoc> to specify naive Bayes binary learners for ECOC multiclass % learning.