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

After SAS Code Node Variables Disappear- Rather, Never Appear

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 115
Accepted Solution

After SAS Code Node Variables Disappear- Rather, Never Appear

Ladies & Gentlemen,

Pretty simple - I start with a data file. I then attach a SAS Code Node to it for bucketing a continuous variable into four discrete ordered buckets. I can view and Edit most of the variables in both the data node and in the Code Node. The only variable I cannot see or edit is the newly created one. [Previously any of this bucketing I would do in Enterprise Guide then re-read the data into Enterprise Miner.]

Next I attach a Text Parsing node to the Code Node. When I go to Edit Variables in my Text Parsing Node only my text field shows up. But I think the rest of the variables are there. So if I attach a Decision Tree Node next all of the variables except for my newly created on are there.

Should I do something different with my Code Node? I am including the code below for your convenience. Any recommendations of adjusting my code to make the new data field show like the rest would be great. Thank you.

proc format;

  value F_TOTALRESERVES_B

                          0 -< 300 = 1

                          300 -< 1500 = 2

                          1500 -< 10000 = 3

                          10000 - high = 4;

run;

data &em_export_train;

  set &em_import_data;

  TOTALRESERVES_B = put(TOTALRESERVES, F_TOTALRESERVES_B.);

run;

%EM_METACHANGE(

  NAME = TOTALRESERVES_B,

  LEVEL = ORDINAL,

  ROLE = TARGET

);


Accepted Solutions
Solution
‎03-23-2015 04:26 PM
SAS Super FREQ
Posts: 272

Re: After SAS Code Node Variables Disappear- Rather, Never Appear

I think that is all correct.  If you click on the SAS Code node, then click on the ellipsis button for Exported Data from the Properties panel, you can see from there whether your variable is being picked up correctly. 

ExportedData.png

Click on the row for TRAIN, then the Properties... button. On the Variables tab, you should see your new variable listed as a Target.  I'm guessing it's the case that the Text Parsing node only displays variables with a particular role, but not sure why you wouldn't see it for Decision Tree.  Anyway, confirming that it shows up here is the first step.

View solution in original post


All Replies
Solution
‎03-23-2015 04:26 PM
SAS Super FREQ
Posts: 272

Re: After SAS Code Node Variables Disappear- Rather, Never Appear

I think that is all correct.  If you click on the SAS Code node, then click on the ellipsis button for Exported Data from the Properties panel, you can see from there whether your variable is being picked up correctly. 

ExportedData.png

Click on the row for TRAIN, then the Properties... button. On the Variables tab, you should see your new variable listed as a Target.  I'm guessing it's the case that the Text Parsing node only displays variables with a particular role, but not sure why you wouldn't see it for Decision Tree.  Anyway, confirming that it shows up here is the first step.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 211 views
  • 1 like
  • 2 in conversation