BookmarkSubscribeRSS Feed
Herlu
Calcite | Level 5

We are experiencing a situation where SAS Eminer does not optimize the sas code produced in the scoring node. It seems to be linked to the fact that we are inserting a SAS code node into process. The outcome is that the score node publishes the code, but it is not optimized in the sense that all the transform variables are included, instead of only the one's that are used in the final model.

I have found the following comment on the web http://support.sas.com/kb/44/249.html but our problem seems to be caused by the SAS code node rather than inserting a specific type of transform node.

Any advice?

Thanks

Herlu

1 REPLY 1
DougWielenga
SAS Employee

SAS Enterprise Miner does not 'optimize' code per say but it does monitor the variables being passed through the process so that (in general) only the code involving necessary variables is included.   It is possible that some data preparation methods (e.g. Tree imputation) might require variables for imputation that were not actually used in the model.  Some transformations such as principal components involve many variables that might not be used in the final model yet they would all be required if they were needed for a principal component.  

 

In the SAS Code node, there are sections for training code and for scoring code.   The code you place in the Score code section of the SAS Code node will be included in the code captured by the Score node.  Are you creating new variables in the SAS Code node?  If so, is it possible to create them in a standard node such as the Transform Variables node?  If not, what code are you running in the SAS Code node?  Please note that the Score code is designed for transformations that can be done in a single data step.  If your code requires more than one data step and/or requires a procedure step, it is possible you will not be able to generate optimized score code.  

If you can share your flow and the code, we could likely respond more specifically.

 

Cordially,

Doug

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