weakclassify.m
来自「adaboost算法的一个简要编程,对于训练算法能有一个很好的初步指导作用」· M 代码 · 共 34 行
M
34 行
function [Result]=WeakClassify(X,H,WLearner)%% Input% X - vector to be classified% H - a hypothesis/claassifier used% H is a stucture of parameters characteristic of the hypothesis% parameters depend on the learning procedure % % in particular use 2-class Gaussian model: % Mu=H{1}; % Mu(1),Mu(2)-means of the 2 classes% InvSigma=H{2}% InvSigma(1),InvSigma(2)-invserse if std. deviation matrices of% the 2 classes%%% WLearner - weak learner type%% Output:% Result - 0 if X does not belong to the class(class 1),1 else %switch (WLearner) case {'Gauss','Gaussian'} Result=WeakClassifyGauss(X,H); case 'ROC' Result=WeakClassifyROC(X,H); otherwise %no weak learner available return;end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?