BookmarkSubscribeRSS Feed
NicolasC
Fluorite | Level 6

Hi 

 

I would like to know whether there is the possibility to run SAS EM from a batch file in Windows. In the long term I'd like to have this batch file running my EM diagram at regular intervals of time so that I just go in the Score folder to get the score sas file. I am not intending, for now, to pass any arguments to SAS EM with my batch file, just launch it, close it, and run my diagram.

 

Many thanks

 

Nicolas

 

 

5 REPLIES 5
Reeza
Super User

If this is just to score data you don't need to use SAS EM for that. SAS EM will produce code that you can 'productionize' in your SAS Server or using SAS EG/Base or other systems as the PMML file is available. 

 


@NicolasC wrote:

Hi 

 

I would like to know whether there is the possibility to run SAS EM from a batch file in Windows. In the long term I'd like to have this batch file running my EM diagram at regular intervals of time so that I just go in the Score folder to get the score sas file. I am not intending, for now, to pass any arguments to SAS EM with my batch file, just launch it, close it, and run my diagram.

 

Many thanks

 

Nicolas

 

 


 

NicolasC
Fluorite | Level 6

Thanks for your answer.

What do you mean by cannot 'productionize it'. At the moment, I create my data base from various DWs with EG, create the model with EM, and use the core back in EG. The reason  I use EM is because 1. I run several methods in parallel 2. my data is somehow dirt and a lot of manual intervention is required prior to run the different methods. 

Knowing that, is it possible to launch EM with  batch, run the diagram I will have previously set-up, close EM once last node is ran.  

 

Many thanks

 

Nicolas

Reeza
Super User

I didn't say "cannot productionize" it, I said you don't need SAS EM to score your data.

 

Assuming your inputs are the same, which is the case in either situation, the SCORE code doesn't need to be run in SAS EM, you can run in it SAS EG where you can then schedule it more easily. Or you can usually extract Java or C++ code to use in a server without SAS entirely. 

 

The SCORE node has the option somewhere to export this code. The SAS score code takes care of all that data cleaning and any prep steps you did in EM as well. 

 

Are you looking to:

 

1. Re-calibrate/develop your model each time with new data, because that's what running your full diagram will do each time. 

2. Take a completed model and SCORE new data each month with the model originally developed. 

 

I'm assuming you're attempting Step 2, which is different than running your diagram fully each time. 

 

 

 

CraigDeVault
SAS Employee

Reeza is correct.

If you run the SAS Enterprise Miner batch code in Windows (Base SAS, SAS Enterprise Guide, etc.), the code will create a new project/diagram by default and re-train the model that was designed in the GUI.

If you take the model generated within the GUI, open up the results of the Score node and save out the (by default) Optimized SAS Score code (or PMML, C Score, Java Score, per your business reasons) and apply that generated score code on a new set of observations, then you do not need to use the SAS Enterprise Miner batch code.  The outputted optimized SAS Score code is simply a concatenated standard data step program of each node's score code (with a couple of nodes that are exceptions) that can be implemented as part of a batch scoring process that can be scheduled to run whenever needed based on your business needs.

NicolasC
Fluorite | Level 6

Hi Reeza

 

Thanks for your answer. I am actually looking to complete 1. as per your definition. The idea is to recreate the score every now and then without my intervention in doing so. Is that possible?

 

Thanks

 

Nicolas

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