BookmarkSubscribeRSS Feed
JBerry
Quartz | Level 8

When generating "Optimized SAS Code" from Enterprise Miner, I notice this macro being invoked   %DMNORMCP

I can't seem to find any documentation of what is behind it, or what it is doing. It seems to be called in conjunction with variable transformations.

Here is a snippet of code of how it's used:

length _NORM32 $ 32;

%DMNORMCP( v1 , _NORM32 )

drop _NORM32;

select(_NORM32);

  when("01:LOW--83.91706                " ) _PVAL = _PVAL + -0.533663188;

  when("02:-83.91706-HIGH, MISSING      " ) _PVAL = _PVAL + 0;

end;

5 REPLIES 5
jakarman
Barite | Level 11

There will be even many more of them.

Some are documented in the online doc of miner.

You are probably not interested in every machine instruction that gets called. Why are you interested in this one?

---->-- ja karman --<-----
JBerry
Quartz | Level 8

Well, this the one that I haven't been able to find documentation for, and I'm curious of what it's doing. I generally avoid letting my data go through a black box, so I want to modify the score-code produced by E-Miner so that it isn't using any macros. If I know what it's doing, I can easily recreate it within the datastep.

jakarman
Barite | Level 11

I do not get it. It looks you are trying to reverse engineer some automatic generated code.

One of the last steps of eminer is a scoring node. That one is able to deliver the model formula as some java or other language code for doing the scoring in an other system.

In database processing is possible with sas tooling.

May be this part is not the maturity level as wished but it is existent.

---->-- ja karman --<-----
JBerry
Quartz | Level 8

Yes, I am trying to know what the macro is doing. Is it modifying the variable's value?

However your suggestion is a good one - I can probably tell the SCORE node to create java code, and then find the place in the java code where this macro is used, and decipher what it's doing.

I was hoping there was an explanation or documentation somewhere, I'll open a ticket w/ SAS Support and if I get an answer, I'll post it here for the future benefit of others.

JBerry
Quartz | Level 8

For the benefit of others, here is the response I got from SAS Support about the issue (they are still very tight lipped about the code behind it)

The short answer is that the macro is just cleaning up temporarily during the scoring process.  Your variable in the data is not changed.  You can think of it as a utility macro that is used just during the score calculation.  You might notice other variables in the score code too that are just temporarily there for the purpose of making a calculation.

Example: suppose that you code a DATA step with an array. You use some counter J for a "do j=1 to Dim(myarray);" loop. At the end, you drop J.  For someone trying to interpret your code, J is just a utility (for lack of a better term) variable that was used temporarily in the calculation.  It has no interpretation for the actual outcome.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 2065 views
  • 3 likes
  • 2 in conversation