How can I use the "predictorImportance" function with models generated by applying "crossval" to RegressionTree objects?
When I apply the ‘crossval’ function on the results of the ‘fitrtree’ function, I end up with a different class, namely: 'classreg.learning.partition.RegressionPartitionedModel' and am unable to use the 'predictorImportance' function on this object. How do you call 'predictorImportance' on the models generated from 'crossval'?
%%Load the sample data. load carsmall; %%Construct a regression tree using the sample data. tree = fitrtree([Weight, Cylinders],MPG,... 'categoricalpredictors',2,'MinParentSize',20,... 'PredictorNames',{'W','C'}) ; %%cross validation Ctree = crossval(tree); % where tree is the original ‘RegressionTree’ object. Note that the default number of folds i.e. regression models generated will be 10 %%Calling predictorImportance on individual regression models predictorImportance(Ctree.Trained{1}) predictorImportance(Ctree.Trained{10}) % where 1 and 10 represent the indices of the trained models. This would range from 1 to 10 by default
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.