BookmarkSubscribeRSS Feed

An Introduction to Machine Learning in SAS Model Studio

Started ‎09-08-2023 by
Modified ‎09-08-2023 by
Views 409

The purpose of this post is to introduce how to develop machine learning models quickly and easily in SAS Model Studio. SAS Viya allows us to generate impactful insights by transforming data into value. While the analytics life cycle consists of three phases (data, discovery, and deployment), this post will focus on middle of that journey. SAS Viya’s machine learning capabilities are a great way to develop models during the discovery phase of the analytics life cycle. SAS Model Studio is the perfect interface to quickly build pipelines of machine learning models.

 

To get started, I’ll be using financial services data. The accounts in the data represent consumers of home equity lines of credit, automobile loans, and other short- to medium-term credit instruments. The target variable (b_tgt) relates to whether an account holder purchased a new product from the bank in the past year. The data set contains almost 53,000 rows and 22 columns. We will see more detail on the variables in our exploration, but they contain demographic information, account activity level, and various purchase behaviors. These features along with the target will be used to train our prediction models to identify which future customers might be purchasers.

 

From SAS Drive we open the Model Studio web application by clicking the applications menu icon 02_AR_AppMenu.png and select Build Models.

 

01_AR_BuildModels-1.png

Select any image to see a larger version.
Mobile users: If you do not see this image, scroll to the bottom of the page and select the "Full" version of this post.

 

Model Studio application is where we can create our pipelines of models. We select New Project to create a new modeling project. We then fill out the New Project window giving our project an appropriate Name and select our data table named BANKPART_HOW. Conveniently, the data table has already been loaded into memory in the PUBLIC library.

 

03_AR_NewProject-239x300.png

 

Select Save to finish creating the new modeling project. SAS Model Studio opens to the Data tab and requests that we select a Target before we can run any pipelines. Remembering that our target variable is named b_tgt, we select it and set its role to Target. For tables that are used often across projects, you can easily save metadata properties to a global table. (By storing metadata configurations in the Global Metadata repository, properties will apply to new data tables that contain variables with the same names.)

 

04_AR_SetTarget-1024x225.png

 

Let’s take advantage of some of the pre-built pipelines that are included with Model Studio. Click the Add new pipeline icon 4a_AR_AddNewPipeline.png to open the New Pipeline window. We give our new pipeline an appropriate name and select Browse to open the Browse Templates window. 

 

05_AR_BrowseTemplates-1024x413.png

 

Model Studio templates are pre-populated pipelines with configurations of various models. In addition to the three levels (basic, intermediate, and advanced) of included templates, customized pipelines can be saved to the Exchange where they become accessible to other users. Select Advanced template for class target to create a data mining pipeline that includes some sophisticated machine learning models like neural networks and gradient boosting machines. Then select Save to see the pipeline in Model Studio.

 

06_AR_AdvPipeline-1024x588.png

 

The Advanced template for a class target contains a pipeline with a total of six models (purple nodes) and one ensemble model. Even though we could modify this pipeline (e.g., add another model) or change the defaults of the existing models, we simply choose to use the template unaltered. Select Run pipeline to run all the included models and then reveal which is the champion model. Right-click the Model Comparison node to open Results. The results from pipeline reveal that the Forest model is the champion based off the KS(Youden) model fit statistic.

 

07_AR_Results.png

 

I've just shown you how quick and easy it is to build predictive machine learning models using SAS Model Studio. I bet if we fine tune or even autotune the hyperparameters of these models we could increase their predictive accuracy. Would you like to keep learning? Well, you have some great options. First, maybe you would be interested in taking an instructor-led course. Machine Learning Using SAS® Viya® will get you started. In this course you will learn how to build several different models, tweak them to get better results, and learn how to interpret the results. In fact, this course can prepare you to get certified as a SAS Certified Specialist: Machine Learning Using SAS Viya.

 

Secondly, maybe you would want to attend the SAS Explore conference, September 11-14 in Las Vegas, NV. I am presenting two Hands-on-Workshops on SAS Model Studio. As a Business Analyst or Data Scientist at SAS Explore, you can learn new techniques for deriving reliable insights for any of your business challenges. Trust me, even though I am presenting at the conference, just like you I will be looking for opportunities to increase my knowledge base. Never stop learning!

 

I hope to see you in Las Vegas or in one of our classes!

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎09-08-2023 04:21 PM
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 Labels
Article Tags