Hi All,
Please use the code for Decision Tree Classification
---------------------------------------------------------------
train1=[30 56 1 1 1 ; 31 10 1 1 1;10 1 60 1 1;14 1 30 1 3 ; 14 1 30 1 17;6 1 25 6 1;6 1 25 17 1]; // Training Set
G=[0 1 0 0 1 0 1]; // Labels of Training data
Mdl = fitctree(train1,G); // Training Decision Tree
test1=[30 63 1 1 1]; // Testing data
hup=predict(Mdl,test1); // Testing the decision tree
--------------------------------------------------------------
Please use the code for Decision Tree Classification
---------------------------------------------------------------
train1=[30 56 1 1 1 ; 31 10 1 1 1;10 1 60 1 1;14 1 30 1 3 ; 14 1 30 1 17;6 1 25 6 1;6 1 25 17 1]; // Training Set
G=[0 1 0 0 1 0 1]; // Labels of Training data
Mdl = fitctree(train1,G); // Training Decision Tree
test1=[30 63 1 1 1]; // Testing data
hup=predict(Mdl,test1); // Testing the decision tree
--------------------------------------------------------------
No comments:
Post a Comment