Interact, learn and grow

Join Now
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted
SAS Employee
Posts: 10
Juletip #9 How to use Visual Statistics score code in Enterprise Guide
[ Edited ]

So, you have explored massive amounts of data and created a perfect descriptive or prescriptive model. Maybe a k-means clustering model of Santa's eager clientele? Now you would like to utilize your model by scoring your data, but wonder how it's done. Luckily the score code produced by SAS Visual Statistics can be run very easily almost everywhere. You can use Base SAS software, SAS Studio, SAS Enterprise Guide and even SAS Visual Analytics (Data Builder module) to run your score code. Here's the simple steps how to do it in SAS Enterprise Guide:

 

Cover

Create a model in Visual Analytics

Export the score code

Export the score codeExport the score code

 

Now, go to your SAS Enterprise Guide and open a project. Then insert New Program. You can copy paste the code snippet from below and adjust the libname statements and table names according to your own environment. Finally insert to score code to a place marked in the code snipped.

 

/**** Library pointing to where your source data is located ****/
libname LIB_FROM 'C:\tmp\Source';

/**** Library pointing to where your output data will be created ****/
libname LIB_TO 'C:\tmp\Target';

data LIB_TO.YOUR_OUTPUT_DATASET_NAME (    );
	set LIB_FROM.YOUR_SOURCE_DATASET_NAME (  );
 
   /**** INSERT YOUR EXPORTED SCORE CODE HERE ****/

run;

 

You are ready to run yor project and reap the benefits of your very own analytical model "in production". Voilá! 

 

Have a very merry Christmas!

 

Kind regards,

Petri Roine