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

When a dataset is read in SAS the varaibles are classifies as numeric in character . While SAS Enterprise miner classifies them as nominal & interval . Can some one tell me how is it done in Miner(the logic) & how it can be achieved using SAS Enterprise Guide? 

1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

For your first question, when using the "Basic Advisor" in Enterprise Miner, it is just assigning numeric variables to Interval and character variables to Nominal.  With the "Advanced Advisor", the assignment for numeric variables is based on the number of levels the user specifies (20 by default, so numeric variables with < 20 levels would be set to Nominal and >=20 would be Interval).

View solution in original post

6 REPLIES 6
WendyCzika
SAS Employee

For your first question, when using the "Basic Advisor" in Enterprise Miner, it is just assigning numeric variables to Interval and character variables to Nominal.  With the "Advanced Advisor", the assignment for numeric variables is based on the number of levels the user specifies (20 by default, so numeric variables with < 20 levels would be set to Nominal and >=20 would be Interval).

pa4
Fluorite | Level 6 pa4
Fluorite | Level 6

Hi I am still same issue. 

 

My all interval variables in dataset is read by SAS EM as nominal & i am unable to change it. 

I am not using advanced advisor . I also tried metadata node from utility tab but still its reading them as Nominal. 

 

This is happening in file import node as well as when i tried to save csv file as SAS dataset. 

 

Any help would be great !! 

 

Thanks , 

PA4

DougWielenga
SAS Employee

Make sure that you check whether the variables in question have any non-numeric data and/or have a non-numeric format.    One of the fastest ways to check is to run the CONTENTS procedure against your data set and see how it is being read.   Data that is exported to text formats often have extremely long lengths attached to them depending on the source of the data.   Depending on how big the data set it is, you might consider trying to import it into SAS Enterprise Guide, but you issue more than likely has to do with non-character data and/or formats.   You will typically find it easier reading in a SAS data table.  

 

If you run the CONTENTS procedure, look for character formats/informats.   It is easy to remove formats/informats with a data step like the following:

 

data new_data;

    set old_data;

    format _all_;

    informat _all_;

run;

 

You can also just remove the offending formats from the variables in question in place of using _all_ to remove all of them.  The formatting of numeric variables should not matter anyway since it is just for display, but you must remove any character formats which is most likely the cause of the problem.

 

Hope this helps!

Doug

MelodieRush
SAS Employee
What is your goal in Enterprise Guide? This will determine what you need to do.

Catch the SAS Global Forum keynotes, announcements, and tech content!
sasglobalforum.com | #SASGF



Lopa2016
Fluorite | Level 6

Hi Melodie ,

 

Thanks for your reply. I need to run a random forest in EG & that requires the nominal & interval variables to be specified using the HPForest:

 

PROC HPFOREST data=testdata maxtrees=100;
target Ind/level=binary;
input &nom_vars/level=nominal;
input &int_var /level=interval;
run;

 

I know in Miner its a lot easier but I want to replicate the same thing using EG.

 

Thanks again!!

DougWielenga
SAS Employee
It seems you have already answered your own question. You would need to assign the variables to the nominal and interval level based on the number of levels. You could use the FREQ procedure to determine the number and nature of levels. Please help me understand what is not working if you are still having difficulty! Thx, D

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 6 replies
  • 15226 views
  • 0 likes
  • 5 in conversation