MATLAB: How to retrieve the maximum pruning levels from a CLASSREGTREE in MATLAB 7.6 (R2008a)

MATLAB

I want to retrieve the maximum pruning levels from a CLASSREGTREE in MATLAB 7.6 (R2008a).

Best Answer

You can obtain the maximum pruning level of a CLASSREGTREE with the following code:
load fisheriris;
t = classregtree(meas,species, 'names',{'SL' 'SW' 'PL' 'PW'})
max(t.prunelist)