BookmarkSubscribeRSS Feed
Lbind91
Calcite | Level 5

Hi everybody

 

I'm new to SAS EM, so it may be a simple question to some.

 

I want to rename a variable, which I derived from a consolidation tree. The output name of my new varaible is just _NODE_, which doesn't say much. How can I rename it? I have read, that I maybe could use the transform variables node - but I can't figure out how.

 

Thanks!

 

/Louise

2 REPLIES 2
candby
SAS Employee

As you note, the Applied Analytics Using Enterprise Miner notes (page 9-28) suggest using the Transform Variables node to change the name, but may be simpler to just perform a DATA step in the SAS Code node.  Assuming you are inputting and outputing a training data set, the DATA step might look something like the following:

 

data &EM_EXPORT_TRAIN;

     set &EM_IMPORT_DATA (rename=(_NODE_=<newname>));

run;

 

Hope this helps.

Dave

 

 

DougWielenga
SAS Employee

 

You can use the approach described by @candby  where you would need to do a data step for each data partition being passed through (e.g. Train, Validate, Test) but those changes would not be reflected in the resulting score code.  It might be easier to just add a line to the Score code section of a SAS Code node such as the following:

 

 MyNewVar = _NODE_;

 

The new variable MYNEWVAR will contain the value of _NODE_ in every resulting data set that is passed through the modeling node and/or scored by score code from a subsequent Score node.  Admittedly, you are not renaming the variable but still can accomplish the desired outcome. 

 

Hope this helps!

Doug 

 

 

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 3145 views
  • 1 like
  • 3 in conversation