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

Hi,

 

I am using SAS Miner and when I use IGN node to group variables as WOE, some variables' formats are converted with %dmnormip(_Format) code. I wonder that what is this code and what purporses does Miner create it?

 

I am sharing a short part of the code with you.

 

*------------------------------------------------------------*;
* Variable: K_SEGMENT_CLASS;
*------------------------------------------------------------*;
LABEL GRP_K_SEGMENT_CLASS = "Grouped: K_SEGMENT_CLASS";
LABEL WOE_K_SEGMENT_CLASS = "Weight of Evidence: K_SEGMENT_CLASS";

_UFormat = put(K_SEGMENT_CLASS,8.0);
%dmnormip(_UFormat);
if MISSING(_UFORMAT) then do;
GRP_K_SEGMENT_CLASS = 3;
WOE_K_SEGMENT_CLASS = 1.0017861627;
end;
else .......

1 ACCEPTED SOLUTION

Accepted Solutions
DougWielenga
SAS Employee

There are a few programs and macros that are not externally documented but are available even in an environment where SAS Enterprise Miner is not installed.  Enterprise Miner generates score code that can be run in base SAS and the macros

 

    *  DMNORLEN.sas

    *  DMNORMCP.sas                 

    *  DMNORMIP.sas
 
are installed and available in Base SAS.  SAS Enterprise Miner uses these macros to normalize variable names and levels to be no longer than 32 characters.  This helps to keep the size of the score code manageable and also speeds processing since comparing long strings of characters is more time consuming.   The change is done internally during modeling/scoring but does not impact the original variables.  This is more than just truncating the variables since Enterprise Miner must still distinguish between different variables names/levels which may have similar names.  We often recommend making sure every variable name and level differs in the first 20 characters so that they can be distinguished even if they are normalized.  In the event that variable names or levels need to be truncated and there are multiple names/levels with the same first 32 characters, these macros will shorten the names again and add numbers to keep them separate, but this makes it challenging to map back to the actual variables.

 

I hope this helps!

Doug

View solution in original post

1 REPLY 1
DougWielenga
SAS Employee

There are a few programs and macros that are not externally documented but are available even in an environment where SAS Enterprise Miner is not installed.  Enterprise Miner generates score code that can be run in base SAS and the macros

 

    *  DMNORLEN.sas

    *  DMNORMCP.sas                 

    *  DMNORMIP.sas
 
are installed and available in Base SAS.  SAS Enterprise Miner uses these macros to normalize variable names and levels to be no longer than 32 characters.  This helps to keep the size of the score code manageable and also speeds processing since comparing long strings of characters is more time consuming.   The change is done internally during modeling/scoring but does not impact the original variables.  This is more than just truncating the variables since Enterprise Miner must still distinguish between different variables names/levels which may have similar names.  We often recommend making sure every variable name and level differs in the first 20 characters so that they can be distinguished even if they are normalized.  In the event that variable names or levels need to be truncated and there are multiple names/levels with the same first 32 characters, these macros will shorten the names again and add numbers to keep them separate, but this makes it challenging to map back to the actual variables.

 

I hope this helps!

Doug

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
  • 1 reply
  • 3564 views
  • 2 likes
  • 2 in conversation