BookmarkSubscribeRSS Feed

SAS Intelligent Decisioning: Using a Matrix in a Segmentation Tree

Started ‎08-19-2026 by
Modified ‎08-19-2026 by
Views 101

I have written two previous posts about Segmentation Trees:

 

 

As a refresher a segmentation tree is a hierarchical structure that consists of a root node, branches, and final leaf nodes called outcomes. Any branch can lead to additional branches or to an outcome. Each branch in the tree specifies criteria that determine whether that particular branch is executed.  There are three branch element types:

 

  • Boolean – specifies an expression that must be evaluated to True or False and creates those two branches.
  • Variable – creates a branch for each value in the value list or local value list that is associated with the variable.
  • Matrix – this branch type is the subject of this post. Read on to learn more!

 

 

Matrix Branch Type

 

The matrix branch type is a table in which each cell identifies a different combination of the values of two different variables. Both variables that are used to build the matrix must be associated with a value list. The values in the lists are used to determine the rows and columns in the matrix. SAS Intelligent Decisioning also adds a row and a column labeled Other to cover any values not specified in the respective value lists. Matrices are particularly useful when each variable has many possible values.

 

 

Create Segmentation Tree

 

I create a Segmentation Tree file for my example of using a matrix.

 

Matrix1.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

 

Value Lists

 

To support the matrix branch type, I need two value lists – one for each of the two variables that are going to make up the matrix.  In my example, I am going to create a matrix based on a Credit Score variable and a Debt-to-Income Ratio variable for the purposes of a loan request evaluation.

 

For the Credit Score variable I will use a value list that is saved on the Value Lists page of SAS Intelligent Decisioning.

 

Matrix2.png

 

For more information about value lists refer to the documentation.

 

In the segmentation tree I create a local value list for Debt-Income-Ratio.

 

Matrix3.png

 

For more information on local value lists refer to the documentation.

 

 

Add Variables

 

On the Variables tab for the Segmentation Tree, I add the needed variables.  The Credit Score and DEBTINC variables are linked to their appropriate value lists.

 

Matrix4-1024x476.png

 

 

Create Matrix

 

To create a matrix, on the Segmentation Tree tab select the Matrix page and then + to add a matrix.

 

Matrix5-1024x484.png

 

Enter a name for your matrix.

 

Matrix6.png

 

  1. Select variables. Select the column and row variables for your matrix.  These variables must be associated with a value list.

 

Matrix7-1024x584.png

 

  1. Specify variable values. The respective value lists for each variable should be listed.  If not, then select one or create one.

 

Matrix8-1024x590.png

 

  1. Add result strings. A result string is a label that identifies a specific combination of two variable values in a matrix. Add all the possible results for the matrix.

 

Matrix9-1024x584.png

 

  1. Define results matrix. Finally map the appropriate result to each combination of the matrix.  Note: SAS Intelligent Decisioning also adds a row and a column labeled Other to cover any values not specified in the respective value lists.

 

Matrix10-1024x548.png

  

Add the matrix to the Segmentation Tree canvas.

 

Matrix11-1024x420..png

 

 

Add Outcomes

 

An outcome is a named set of actions to be taken in a segmentation tree branch.  I have added an outcome to set the variable Status to the appropriate value for each result of the matrix.

 

Matrix12-1024x492.png

 

 

Test Segmentation Tree

 

Finally, I setup a test for my segmentation tree and review the results for the Status output variable in SAS Visual Analytics.

 

Matrix13-1024x488.png

 

 

Summary

 

Using a matrix in a segmentation is helpful when the two variables have many possible options.  For more information on segmentation trees refer to the documentation.  Segmentation Trees are also covered in the SAS® Intelligent Decisioning: Beyond the Essentials training course.

 

 

Find more articles from SAS Global Enablement and Learning here.

Contributors
Version history
Last update:
‎08-19-2026 02:43 PM
Updated by:

Viya Copilot Motion Graphic.gifViya Copilot Motion Graphic

Ready to see what SAS Viya Copilot can do?

Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.

Get Started →

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags