BookmarkSubscribeRSS Feed
rogelio_mancisidor
Calcite | Level 5

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??

3 REPLIES 3
gergely_batho
SAS Employee

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.

rogelio_mancisidor
Calcite | Level 5

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.

gergely_batho
SAS Employee

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 986 views
  • 0 likes
  • 2 in conversation