Get the paths that are defining my predictions in some decision trees
I have been using this tool for a very short time and a "small" setback has arisen, or so I hope.
I'm running a model for which I'm using a meta-operator, specifically, metacost, with an assembled decision tree. The model returns me to different trees, so far so good. The problem arises now. I can not find how to get the paths that are defining the prediction in each of these trees separately.
In a previous post I could read this solution:
Accepted by topic author cypressproject0
06-09-2017 04:15 AM
Re: How to know ... in a tree model or tree to rules?
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:
Screen Shot 2017-06-07 at 8.49.19 AM.png "
And here's the output:
Screen Shot 2017-06-07 at 8.50.45 AM.png "
And later and in this same post is the same problem that brings me today to you: "This solution is for a pure tree not for an operator assembled as a metacost."
Then offer this solution:
my problem MetaCost is 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 it does not take the logic of MetaCost into account. "
And then the script.
Well: My question is: What do I do with that script? How can I achieve what I need? How can I know which path leads me to each prediction in each of the trees? Anyway. Any help will be a great help.