www.pudn.com > adaboost.rar > WeakClassify.m


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;