visualize a tree and splitting point in TreeBagger

17 views (last 30 days)
Hi, Suppose I fit a TreeBagger with 2 column predictor variables X:
B = TreeBagger(1,X,y, 'Method','classification','NVarToSample',1,'oobpred','on')
I want to visualize any tree that I choose, and the splitting values. How can I do that? Thanks!

Accepted Answer

Ilya on 13 Oct 2013
doc TreeBagger and take a look at the Trees property. For example, to see the first tree

Sign in to comment.

More Answers (1)

Mohammad Abdulla
Mohammad Abdulla on 5 Jul 2018
Hi, How can I increase the number of iterations for fitting a decision tree or random forest? Also, how can I change the opimizer from Bayesian to other such as grid search

Community Treasure Hunt

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

Start Hunting!