Managing models can sometimes be tricky. SAS Viya 3.3 can help you with this! This post provides a few highlights regarding exporting, importing, and managing models in SAS Viya 3.3 using SAS VA|VS|VDMML 8.2 and SAS Model Manager 15.1. Specifically, I will touch on the Explore and Visualize Data, Build Models (Model Studio) and Manage Models (Model Manager) interfaces.
In this post, I will use terms interchangeably as follows:
I also use these terms for icons:
snowman = vertical ellipsis icon (there are several of these, top right of your screen; some appear only when you hover over them in the top right of the canvas)
hamburger = three horizontal lines icon at the top left
Models built in this interface can be exported for a variety of reasons, for example to run in Hadoop. The Interactive Interface (Explore and Visualize Data tile) lets you create an ASTORE file for select models. To do this, hover over the upper right corner of the canvas until a snowman appears and click on the snowman to open the overflow menu; select Export model.
For example, see partial screen capture of SAS scoring code created for my Random Forest model:
The following models can be exported from the VA|VS|VDMML Visual Interface (Explore and Visualize Data) as an ASTORE file:
When exported from the Explore and Visualize Data interface, the following models do not create an ASTORE, but do create SAS DATA Step scoring code:
For example, see partial screen capture of SAS scoring code created for a Logistic Regression model:
Clicking Export sends that code file to your downloads directory as a file with .sas extension.
The Pipeline Interface (Model Studio, i.e., Build Models tile) is new in SAS VDMML 8.2 on Viya 3.3. This lets you compare multiple approaches to find the most accurate model.
I first create my pipeline from the Interactive Interface by getting into edit view and selecting a model. In my case I’ll use a logistic regression model. I then open my overflow menu using the snowman in the top right of the canvas. Then I select Create pipeline as shown below.
This creates a new project and pipeline in Model Studio or the Pipeline Interface. Once I have created a pipeline with my Logistic Regression from the Interactive Interface, I can add more models by simply right clicking on my “Interactive Data Prep…” and clicking on Add below, Supervised Learning, and select a model of my choice. I’ll add Gradient Boosting, Decision Tree, and Forest, and I’ll run it using the right arrow icon, as shown below.
Still in Model Studio, go to the Pipeline Comparison tab. Then click the snowman in the upper right as shown below.
You see that from this overflow menu that you can register models, publish models, import score code, score holdout data, download score API, and download score code.
If you select Register model, you will get a message that the champion model (in this case the Gradient Boosting model) was successfully registered.
Close the box. Using the hamburger icon on the left lets you move to the “Manage Models” Model Manager interface.
In the Model View, I can see that a new model is included inside a new project that was just automatically created when I registered the model in Model Studio. The new project will by default have the same name as the Model Studio project title, which will be the same name as the report title from the Interactive Interface.
I can rename this project by going to the Project View, selecting it using the checkbox, and then opening the overflow menu using the snowman in the upper right corner:
And of course, you can do anything with SAS code, so naturally you can also export models. Note that using SAS code in SAS Studio, you can create an ASTORE for the following procedures:
You can import models into model manager from:
You can configure SAS Model Manager to publish models to:
The CAS publish destination must be properly configured by a SAS Administrator before models can be published to it. See Configuring Publish Destinations
As I mentioned earlier, managing models can be tricky and time consuming, but SAS Viya 3.3 makes it easier than ever before.
For more information
• Import Models into SAS Model Manager 15.1
• Managing Models in Model Studio: SAS VDMML 8.2 User’s Guide
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.