Effacer les filtres
Effacer les filtres

Save Regression Tree using Matlab commands

1 vue (au cours des 30 derniers jours)
Jerry Feng
Jerry Feng le 13 Juil 2015
Réponse apportée : Ilya le 13 Juil 2015
Hi,
I generated a regression tree using RegressionTree.fit() command and I was able to view/save the tree using GUI as a result of command view(treename,'mode','graph'). However, I was not able to complete the saveas() procedure using Matlab commands, as I found no way to access the figure generated by the view() command.
I browsed some previous post including:
which suggests that I can assign a handle to the figure, for example :
h = view(treename,'mode','graph')
saveas(h,'filename','format')
However, when I attempt to do so with my Matlab R2013a, the command I mentioned above generated an error message:
>> h = view(treename,'view','graph')
Error using RegressionTree/view
Too many output arguments.
Can someone please offer some instructions on this?
Thanks in advance!

Réponses (1)

Ilya
Ilya le 13 Juil 2015
You can choose SaveAs from the figure pop-up menu when you click on File in the upper left corner.
If you can't find SaveAs for some reason, try this:
prunelevel = 0;
h = treename.Impl.viewGraph([],treename.NodeMean,treename.PredictorNames,prunelevel,'')

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by