1
votes

I use Random Forest in Weka GUI as the classifier on my training set. However, even I ticked "Output Model" in "More Options," I could not get the actual tree models generated by the algorithm.

I know that J48 Decision Tree can output the model in Weka GUI. Are there any ways for Random Forest to do the same thing in Weka GUI?

The only information reported by Weka GUI is as follows:

=== Classifier model (full training set) ===

Random forest of 5 trees, each constructed while considering 4 random features. Out of bag error: 0.0483 Max. depth of trees: 3

Time taken to build model: 1.07 seconds

2

2 Answers

3
votes

if you want to see the trees you have to click in the area next to the "Choose" option, there you can find an option called "printClassifiers" by default it's "False", you only have to change it to "True" and run your model. Now you can see the trees in the result buffer.

2
votes

If you click the area to the right of where you select the classifier, you will see additional options for the random forest. Here you can select the number of trees to create and there is also an option to "print trees". This will print the trees in the result buffer.