wolffd@0: % Here the training data is adapted from UCI ML repository, 'zoo' data wolffd@0: wolffd@0: dtreeCPD=tree_CPD; wolffd@0: wolffd@0: % load data wolffd@0: fname = fullfile(BNT_HOME, 'examples', 'static', 'uci_data', 'zoo', 'zoo1.data') wolffd@0: data=load(fname); wolffd@0: data=data'; wolffd@0: wolffd@0: data=transform_data_into_bnt_format(data, []); wolffd@0: wolffd@0: % learn decision tree from data wolffd@0: ns=2*ones(1,17); wolffd@0: ns(13)=6; wolffd@0: ns(17)=7; wolffd@0: dtreeCPD1=learn_params(dtreeCPD,1:17,data,ns,[],'stop_cases',5); % a node with less than 5 cases will not be splitted wolffd@0: wolffd@0: % evaluate on data wolffd@0: [score,outputs]=evaluate_tree_performance(dtreeCPD1,1:17,data,ns,[]); wolffd@0: fprintf('Accuracy in old training data %6.3f\n',score); wolffd@0: