function [cl] = DecisionTreeClassifier constructor for the DecisionTree class Inputs: nc: number of classes
0001 function [cl] = DecisionTreeClassifier(nc) 0002 % function [cl] = DecisionTreeClassifier 0003 % constructor for the DecisionTree class 0004 % 0005 % Inputs: 0006 % nc: number of classes 0007 0008 if nargin == 0 || isempty(nc) 0009 error('invalid input arguments') 0010 end 0011 0012 cl.isTrained = false; 0013 cl.trainedCl = NaN; 0014 0015 cl = class(cl, 'DecisionTreeClassifier', Classifier(nc));