Visualizing a tree

I have a classification tree created using AdaBoost's toolbox (GML). I want to visualize this tree. Does anyone know of a simple way to do this?
In the statistics toolbox there is a function called view(t) which takes as input a classregtree, but I'm sure how to construct a variable of this type from my data (the tree in GML's format).
Thanks in advance!

Answers (2)

Jan
Jan on 19 Sep 2011

0 votes

Have you seen the ADT tree on e.g. Undocumented: Integrate JBoost?
Ilya
Ilya on 19 Sep 2011

0 votes

If you work in 11a or later and if you have Statistics Toolbox, you can boost trees using fitensemble function. Then you can use the view method on individual trees saved in the Trained property of the grown ensemble.
You say "a tree" and "this tree". Just to make sure - an ensemble grown by AdaBoost or another boosting method is a collection of (typically) many trees.

3 Comments

Michael
Michael on 20 Sep 2011
Sadly I'm using 2010b, so fitensemble is not an option.
I agree. The output of AdaBoost is a set of week classifiers (trees in my case). I just wrote "a tree" since separating each tree and then visualizing it by itself would be good enough for me, and I guess it should be a more straightforward approach. But of course that if I can visualize everything together it would be best.
Also, my writing had a mistake. I should have read: "but I'm NOT sure how to construct a variable of this type from my data". Is there a way to create a variable of type classregtree?
Thanks for your help.
artsci4
artsci4 on 18 Jan 2013
Edited: artsci4 on 18 Jan 2013
I have a question in regard to viewing the Tree from the fitensemble function. I am using 'RUSBoost' as the method. I can see that there are 1000 trees in the cell called Trained since I set nlearn to be a 1000. But then where is the tree that is actually used for prediction? How can I see that tree?
Jan
Jan on 18 Jan 2013
Please post a new thread for a new question.

Sign in to comment.

Asked:

on 19 Sep 2011

Community Treasure Hunt

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

Start Hunting!