function [outs] = computeOutputs(cl, examples) computes the classification outputs for the given examples Inputs: cl : trained classifier examples : data instances (number of instance X number of features) Outputs: outs : predicted classes prob : probability of each instance to belong to predicted class
0001 function [outs, prop] = computeOutputs(cl, examples) 0002 % function [outs] = computeOutputs(cl, examples) 0003 % computes the classification outputs for the given examples 0004 % 0005 % Inputs: 0006 % cl : trained classifier 0007 % examples : data instances (number of instance X number of features) 0008 % 0009 % Outputs: 0010 % outs : predicted classes 0011 % prob : probability of each instance to belong to predicted class 0012 0013 if ~cl.isTrained 0014 error('Decision Tree Classifier is not trained'); 0015 end 0016 0017 %% Handle Cell Arrays 0018 if iscell(examples), 0019 examples = cell2mat(examples); 0020 end 0021 0022 %%TODO: remove acc output 0023 acc = NaN; 0024 0025 %% Compute Outs 0026 [outs, prop] = cl.trainedCl.predict(examples); 0027