view
View regression tree
Description
Examples
Input Arguments
Tips
To view tree t from an ensemble of trees, enter one of
these lines of code:
view(Ens.Trained{t})
view(Bag.Trees{t})Ensis a full ensemble returned byfitrensembleor a compact ensemble returned bycompact.Bagis a full bag of trees returned byTreeBaggeror a compact bag of trees returned bycompact.
To save tree in the Command Window, get a
figure handle by using the findall and setdiff functions, and then save tree using the function
saveas.
before = findall(groot,Type="figure"); % Find all figures view(Mdl,Mode="graph") after = findall(groot,Type="figure"); h = setdiff(after,before); % Get the figure handle of the tree viewer saveas(h,"a.png")


