Examining the J48 decision tree

8 views
Skip to first unread message

Martin Wunderlich

unread,
Sep 19, 2015, 2:03:43 PM9/19/15
to dkpro-tc-users
Hi all,

I was wondering when using the J48 classifier from Weka (which is an implementation of the C4.5 decision tree algorithm), is it possible to actually examine this decision tree? That is, if I have trained such a tree during a text classification experiment, how can I look at the results? I would like to evaluate which attributes were used at which node or level in the tree.
Thanks a lot.

Cheers,

Martin

Johannes Daxenberger

unread,
Sep 21, 2015, 8:54:55 AM9/21/15
to Martin Wunderlich, dkpro-tc-users
Hi Martin,

I can¹t think of any way to implement this in DKPro TC without modifying
the TestTask; you would probably have to serialize the model after
training and then add a dedicated report which reads the trained model and
writes the graph to a file.

See also:
http://stackoverflow.com/questions/9175116/visualizing-weka-classification-
tree

However, since the Weka GUI has a nice interface which can display the
graph as a tree, you could also use DKPro TC to extract features (i.e.
write an ARFF file) and then load your ARFF into the Weka GUI and train
(and visualize) your decision tree there.

Hope this helps,
Johannes

Am 19.09.15 20:03 schrieb "dkpro-t...@googlegroups.com on behalf of
Martin Wunderlich" unter <dkpro-t...@googlegroups.com on behalf of
mar...@wunderlich.com>:
>--
>You received this message because you are subscribed to the Google Groups
>"dkpro-tc-users" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to dkpro-tc-user...@googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

Martin Wunderlich

unread,
Sep 22, 2015, 1:24:08 AM9/22/15
to Johannes Daxenberger, dkpro-tc-users
Hi Johannes,

Thanks a lot for the hint about using the Weka GUI. I’ll give it a try.

Cheers,

Martin
Reply all
Reply to author
Forward
0 new messages