tree = ClassificationTree.fit(M, A);
and can view this tree using 'view'
view(tree,'mode','graph')
Previously I had split matrix M into training and sample groups however now I would like to use the cross validation method 'crossval' to produce a more accurate accuracy prediction
cvtree = crossval(tree);
I can then use kfoldLoss and kfoldPredict to determine the effectiveness of the tree however I cannot determine how to 'view' the tree in any sense. I have attempted the following;
view(cvtree)
and
view(cvtree,'mode','graph')
when you crossvalidate, the output is a ClassificationPartitionedModel, which means that it contains all the cross-validated trees and will use all of them to do prediction. All the individual trees can be accessed as follows:
>> cvtree.Trained >> view(cvtree.Trained{1},'mode','graph') >> view(cvtree.Trained{2},'mode','graph') % etc
All the individual losses (of course based on your loss function) can be accessed as below:
>> cvtree.kfoldLoss('mode','individual')
You can view and use an individual tree if you like. Use 'kfoldPredict' to predict from the entire crossvalidated model.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.