BookmarkSubscribeRSS Feed

What's New with SAS Model Manager? New/updated Model Management Macros generating JSON files

Started ‎11-19-2020 by
Modified ‎05-18-2021 by
Views 4,657

Have you ever noticed models registered from SAS Studio did not generate plots when you selected "Compare" in SAS Model Manager? Have you ever tried creating and importing required JSON files to render model comparison plots?

 

Great news, we've enhanced SAS Studio integration with SAS Model Manager! SAS Model Manager 2020.1 (November 2020 release) includes new/updated Model Management Macros and an updated SAS Studio registration task. These enhanced options will now generate and import the necessary JSON files for roc, lift, and fitstats for you. This will ensure SAS Studio generated models will successfully visualize plots when you select "Compare" in SAS Model Manager.

 

Check out three quick videos showcasing the coming enhancements!

 

I. Use new macro to create visual plots for existing models

 

Specifically, the new %MM_MODEL_ADD_JSONFILES macro enables you to generate the JSON files for the fit statistics, lift, and ROC assessment criteria, using SAS Studio.

 

/* use new MM_MODEL_ADD_JSONFILES macro to create/include fitstat, lift, and roc json files */
%mm_model_add_jsonfiles(
modelID = %str(a66cf6cc-f515-4b54-bfe4-968d5ba87881), /* model UUID from previously registered model in SAS Model Manager */ scoredata = casuser.LogReg_scoreout, /* previously scored data reference */ samplepct2 = 30, /* data proportion used for validation */ samplepct = 10, /* data proportion used for test */ sampleseed = 1234, /* sampling seed value */ target = Maintenance_flag, /* model target variable */ targetlevel = Binary, /* model target level */ event = 1, /* model target event value */ eventprobvar = P_Maintenance_flag1, /* model event probability variable */ nonevent = 0, /* model non-target event value */ noneventprobvar = P_Maintenance_flag0 /* model non-target event probability variable */ );

 

II. Use new macro to create visual plots when registering a new models

 

The following enhancements have been made to the %MM_IMPORT_MODEL and %MM_IMPORT_ASTORE_MODEL model management macros:

  • You can generate the JSON files for the fit statistics, lift, and ROC criteria and add the JSON files to the model during the import process.
  • When importing a model, you can specify additional model properties such as the modeler and score code type.
  • The %MM_IMPORT_ASTORE_MODEL macro was modified to use the MODELFUNC and ALGORITHM macro variables, in order to be consistent with the %MM_IMPORT_MODEL macro.
filename sfile filesrvc folderpath='/Users/edmdev/My Folder' 
filename='score.sas';
%let x=%sysfunc(fcopy(tempfile, sfile));
%put &x;
filename tempfile clear;

%mm_import_model(
projectID = %str(08432df7-ab3a-441e-af12-e6be21e4171f), /* existing MM project UUID */
importinto = project,
modelID = myModelID,
modelnm = %nrstr(SAS Decision Tree2),    /* model name */
modeldesc = Decision Tree,               /* model algorithm */
modelfunc = Classification,              /* model function */
modelloc = sfile,                        /* model SAS score code file reference */
scoreCodeType=DATASTEP,                  /* model score code type */
traintable = PUBLIC.FLEET_TRAIN,         /* model training table */
scoredata = casuser.DTree_scoredout,     /* previously scored data reference */
samplepct2 = 30,                         /* data proportion used for validation */
samplepct = 10,                          /* data proportion used for test */
sampleseed = 1234,                       /* sampling seed value */
target = Maintenance_flag,               /* model target variable */
targetlevel = Binary,                    /* model target level */
event = 1,                               /* model target event value */
eventprobvar = P_Maintenance_flag1,      /* model event probability variable */
nonevent = 0,                            /* model non-target event value */
noneventprobvar = P_Maintenance_flag0    /* model non-target event probability variable */
);

filename sfile clear;

 

Please note the MININGFUNCTION and MININGALGORITHM macro variables, which were previously used by SAS Model Manager on SAS Viya 3.5 and earlier, have been deprecated. Check out our SAS Model Manager documentation for detailed information about all Model Management Macros.

 

Want to use a SAS Studio Task instead? Check out the updated "Register" task within SAS Viya Evaluate and Implement Models section.

 

III. Use the updated Register task when registering a new model

 

Hope you enjoy the enhanced integration between SAS Studio and SAS Model Manager. Stay tuned to learn about other great new features coming with SAS Model Manager on SAS Viya.

 

For more details about SAS Model Manager 2020.1, please check the "What's new" section of our SAS Model Manager documentation.

 

Interested to learn about other SAS Model Manager features? Please check out other "What's new with SAS Model Manager?" posts including:

 

Comments

This is great! Thanks for posting about these updates. Are there any specific tips you would provide for registering the model from SAS Studio? I tried and received numerous errors with the Register Task.

Version history
Last update:
‎05-18-2021 09:42 AM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags