0001 function [outs, prop] = computeOutputs(cl, examples)
0002
0003
0004
0005 if ~cl.isTrained
0006 error('Decision Tree Classifier is not trained');
0007 end
0008
0009
0010 global trainingExamples
0011 if isempty(examples),
0012 if isempty(trainingExamples),
0013 outs = [];
0014 return;
0015 else
0016 if nargin < 3,
0017 examples = trainingExamples;
0018 else
0019 if iscell(trainingExamples),
0020 examples = trainingExamples(indxs);
0021 else
0022 examples = trainingExamples(indxs, :);
0023 end
0024 end
0025 end
0026 else
0027 if isempty(trainingExamples),
0028 clear global trainingExamples
0029 else
0030 clear trainingExamples
0031 end
0032 end
0033
0034
0035 if iscell(examples),
0036 examples = cell2mat(examples);
0037 end
0038
0039
0040 [outs, prop] = cl.trainedCl.predict(examples);
0041