Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

multiple decission trees on same dataset

Reply
Contributor
Posts: 21

multiple decission trees on same dataset

Hello all,

I am creating several decision trees based on the same dataset. Then I would like to 'fetch' the _NODE_ variable from EMSWx.Tree_TRAIN into my original dataset. This I have done successfully using a Metadata node.

However, my goal is to 'fetch' all _NODE_'s variables from the different decision trees that I have into my original dataset. I have tryed using a metadata node, but in that way it is only 1 _NODE_ exported (probably the _NODE_ coming from the last Tree whihc is run). Is it any elegant way to achive this??

SAS Employee
Posts: 340

Re: multiple decission trees on same dataset

You can rename copy the _NODE_ variable with a Code Node or with Transform Node. Then you can connect a new Tree Node, the original _NODE_ variable won't  be overwritten.

Contributor
Posts: 21

Re: multiple decission trees on same dataset

Hi, it is something that I am missing here... I have tried the 'Transform Variables' node. I have simply conected the node to the 'Decision Tree' node and run it. Then conected a new 'Decision Tree' node and created a new decision tree. In the TRAIN output table of the second decision tree I can only see 1 _NODE_ variable. I beleive that in the 'Transform Variables' node I need to rename _NODE_, is that right? The problem is that in the 'Transform Variables' node I cannot see the _NODE_ variable and  I cannot find where to rename a variable. The only place where I see the _NODE_ variable is when I open the Imported data from the property panel.

SAS Employee
Posts: 340

Re: multiple decission trees on same dataset

You should create a new variable with the Transform Node. The formula for the new variable should be simply:  _NODE_.

Click on Formulas, than Create (upper-left corner)

If you want to see the _NODE_ variable in the formula editor, change Leaf Role (in Decision Tree) to Input.

Ask a Question
Discussion stats
  • 3 replies
  • 323 views
  • 0 likes
  • 2 in conversation