BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Zachary
Obsidian | Level 7

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

);

1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

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

1 REPLY 1
WendyCzika
SAS Employee

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.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 839 views
  • 1 like
  • 2 in conversation