How to know ... in a tree model or tree to rules?
Hello there.
I am new to using this tool and I would like you to help me with a doubt that has arisen.
The question is: Is it possible to know automatically which rule is sorting me an instance in the output of a tree model or a tree for rules?
In this case I have an entry with 200 000 examples and 80 attributes. The tree structure that generated the model tree has a depth of 8. So far so good, but now I need to know automatically which decision rule is being applied to classify a new instance.
Is this possible in rapidminer?
Thanks for helping
Best Answers
-
earmijo Member Posts: 271 Unicorn
You can also use the "Operator Toolbox" Extension. This extension has an operator named "Get Decision Tree Path" that will produce a new variable with the path (a text variable) you have to follow to reach the final node for each observation. Be aware that this extension requires the Text Mining extension. So make sure you load it too.
Here's the process:
And here's the output:
0 -
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
Hello,
this concrete operator will work with a meta cost operator, because it's delivering a pure decision tree. It will not work out of the box with ensemble operators like bagging.
By the way, in the converters extesion we will have a operator called Decision Tree to Example set. This converts the table you see in Description to an example set. I think it fits a bit better.
Best,
Martin
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany0
Answers
You could use both but the easiest is clicking on the Description for the Decision Tree learner.
Thank you very much, this is just what I needed!
Another question: do you think this tool can be applied to a metaclassifier like Metacost if the internal apprentice is a decision tree? If not, can you think of any other solution?
Thank you very much again.
Thank you very much, Thomas.
This path is useful, but I needed something like the solution below. Although as I advance in this the matter is complicated. The model I am developing has a metaclassifier as a base that in turn has a tree of apprentice decision. Knowing the route or routes that the model is following to make a decision is of vital importance for the project in which I am. Can you think of a solution?
Hello Martin. Thank you very much for your help but rapidminer reports me error since the metaclassifier does not deliver a pure tree. It would be a good solution if my model were generated by a pure tree. I am bogged down with this affair.
A greeting.
Whoops,
my problem. MetaCost is of course also an ensemble model. Attached is a process with a small script converting the meta model into a collection of models and then transforming them into example sets. Note that does not take the application logic of MetaCost into account.
Best,
Martin
Dortmund, Germany
Thanks again Martin.
I just need to extract the decision vector or in this case the possible vectors to graph these later. Correct me if I'm wrong, because I'm starting with this now and everything is new to me. Each decision in this metaclassifier will be defined by paths that may or may not be equal. The metaclassifier in this case constructs n trees and then does his work. This is so? With this script is it possible to get what I need? How would you do it?
A greeting.