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

I pepare my data in Enterprise Guide then save it out into a directory to be later read into Enterprise Miner. There are a lot of variables where I would like to set varying parameters. Below are a few examples:

* if Role = "TIMEID" then Level = "INTERVAL";

Role = "INPUT";

if Name = "TRENDED_INCURRED" then Role = "TARGET";

* Making all of the Text Flag fields Nominal;

TEXT_ID = index(Name, "Flag");

if TEXT_ID = 1 then Level = "Nominal";

* Dropping all of the Date variables;

if Role = "TIMEID" then Drop = "Y";

* Changing the following vars to Nominal - some ORDINAL sprinkled in as well for HAZARDC0DE;

if Name = MAXTOTALCODE then Level = Nominal;

if Name = DOCTORS then Level = Nominal;

You can see that I commented out some of my statements as well - do not know if Edit Using SAS Code likes this. If I recall correctly Enterprise Miner can be a little quirky where sometimes it does not like blank lines, or stuff like that.

If I am in the window of editing the SAS code everything looks fine. But when I say OK and re-open my SAS data file in Miner it shows a lot of weird changes or many changes that are just left blank.

Is anything wrong with my version of Miner? But, my big question is if I can set the variable Levels, Roles, and Drop statuses in Enterprise Guide before it is read into Enterprise Miner?

Thank you very much in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

That's correct about upper-casing the values for the variable measurement levels and roles.  But comments and blank lines should be allowed, so not sure why that is causing problems for you.  There are some other ways you can define metadata described in this Tip on Defining Global Metadata for SAS® Enterprise Miner™ Projects that might be of interest:

https://communities.sas.com/docs/DOC-11122

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

Zach, you might be able to use the Recode Variables feature in the EG Query Builder to accomplish what you want.  In the Query Builder, go to Computed Columns, New, then select Recoded Column.  You'll have a few choices for how you express the recoding rules.  There's an article that covers a simple example here in this SAS note.

Also, Dr. AnnMaria shares this experience for how to fix character data without the beatings.

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Zachary
Obsidian | Level 7

Thank you very much Chris. I love the Dr. AnnMaria blog as well - will be visiting that occasionally - she is very funny.

I THINK I have figured out how to effectively use Edit Using SAS Code for the Edit Variables window. Below are some suggestions:

I do not think the system likes comments - either via *; or /* */.

Nor do I think it wants blank lines in there.

This might be a place in SAS where it is important to capitalize key words. So if I set my Level to Nominal, it actually needs to be NOMINAL even though it does not show as all Caps in the window.

I need to experiment more with this one, but I once thought it was important to have a run; after a set of code. But I am not so sure anymore.

They are not much - but following those steps seems to help the process move along in an automated way.

Anything else I might have missed?

WendyCzika
SAS Employee

That's correct about upper-casing the values for the variable measurement levels and roles.  But comments and blank lines should be allowed, so not sure why that is causing problems for you.  There are some other ways you can define metadata described in this Tip on Defining Global Metadata for SAS® Enterprise Miner™ Projects that might be of interest:

https://communities.sas.com/docs/DOC-11122

Zachary
Obsidian | Level 7

Thanks a bunch. Will look into if my comments were more a result of a panic.

Actually - thank you for the link. I now have numerous options in how I can make my data meaningful! Thank you so much!

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
  • 4 replies
  • 1171 views
  • 4 likes
  • 3 in conversation