PDA

View Full Version : Is there any way to convert decision tree to rules?



zzmdl
07-20-2008, 05:02 PM
Hi

If we genterated a decision tree, can we convert it to if... then rules? Thanks!

Best regards
zzmdl

Mark
07-20-2008, 05:42 PM
You would have to write some code to do this. Each path in the tree would become one rule.

Cheers,
Mark.

tigertail
01-06-2009, 04:33 PM
Anyone has implemented the converter?

tdidomenico
01-07-2009, 02:20 PM
Wouldn't this work?

http://weka.wiki.sourceforge.net/Generating+source+code+from+Weka+classes

Mark
01-24-2009, 02:08 AM
Another option to consider is weka.classifiers.rules.PART. This classifier learns a decision list using the J48 code base. Essentially, it builds a decision tree and then extracts the best rule (path with highest coverage) from the tree. The instances that this rule covers are removed from the training set and the process is repeated.

Cheers,
Mark.