Save Regression Tree using Matlab commands

3 visualizaciones (últimos 30 días)
Jerry Feng
Jerry Feng el 13 de Jul. de 2015
Respondida: Ilya el 13 de Jul. de 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!

Respuestas (1)

Ilya
Ilya el 13 de Jul. de 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,'')

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by