BookmarkSubscribeRSS Feed

SAS Intelligent Decisioning: Segmentation Trees and Value Lists

Started 3 weeks ago by
Modified 3 weeks ago by
Views 157

In SAS Intelligent Decisioning (as of LTS 2023.10), you can create segmentation trees and value lists.

 

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. The criteria for a branch might be Boolean expressions, individual variable values, or combinations of variable values called a matrix.  Outcomes define actions to be taken when all of the branch criteria leading to the outcome are satisfied.

 

01_MK_1_Tree.jpg

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

 

When defining a variable for the segmentation tree, you can associate the values of the variable to a value list. A value list is the list of acceptable values for a variable.  Value lists are used for Segmentation tree branches of type Variable or Matrix.

 

For a large, complicated decision that uses simple conditions, a segmentation tree can be an effective way to visually represent the decision's model and to manage the associated outcomes.

 

Value Lists

 

Value lists can be of type Character or Numeric.

 

02_MK_2_Tree.jpg

 

The entries in a numeric value list can be discrete values or ranges.   To specify a range of numeric values, use v to indicate the value of the variable that is associated with the list. Numeric ranges cannot overlap.  To enter multiple value specifications in one entry, separate the specifications with a semicolon.  Multiple entries within the same list cannot specify the same value.

 

Here is an example of a value list for credit score ranges.

 

03_MK_3_Tree.jpg

 

For more information, refer to the Specifying Value List Entries topic in the SAS Intelligent Decisioning documentation.

 

Segmentation Trees

 

SAS Intelligent Decisioning provides a low-code interface for designing segmentation trees, and it displays the segmentation tree in a simplified, compact format.  The three main elements used to build a segmentation tree in SAS Intelligent Decisioning are: Variables, Branches, and Outcomes.

 

Just like other objects in SAS Intelligent Decisioning, you list the variables needed for segmentation trees on the Variables tab.  For each variable, you specify a name, data type, whether it is an input, an output, both, or neither.  You can also specify an Initial value for an output variable.

 

What is different about variables for a segmentation tree is that you can associate a value list with a variable; this means that values for this variable come from the associated value list.

 

04_MK_4_Tree.jpg

 

There are three types of elements used to create branches in a segmentation tree – Boolean expression, Matrix, and Variable. When you add one of these elements to a segmentation tree, SAS Intelligent Decisioning creates branches for each of the possible values or result strings that can be produced by the element. For each value or result string, you can either add an outcome to be executed, or you can add additional branch elements to the tree.

 

A value list must be associated with the variable that is used to create the branch type of variable or matrix. A matrix requires two variables associated with different value lists thus producing a matrix whereas a variable branch is a single variable associated with a value list.

 

05_MK_5_Tree.jpg

 

An outcome is the last leaf in a segmentation tree branch. An outcome is a named set of actions to be taken when all the branch conditions leading to the outcome are satisfied. An outcome can be one or more assignment statements, one or more DS2 code files, or a combination of both. You can reuse the same outcome in multiple places in a tree. You can also customize each instance of the same outcome as needed.

 

06_MK_6_Tree.jpg

 

 

Using a Segmentation Tree in a Decision

 

I can now finally use the segmentation tree in a decision flow.  Adding a segmentation tree to a decision flow is similar to adding any other object to the flow.  Once the segmentation tree is added, you can select to open it in its editor.  You can publish a decision with a segmentation tree to any of the publishing destinations.

 

07_MK_7_Tree.jpg

 

 

Summary

 

Using Segmentation Trees with value lists in your decisions can be a useful combination for representing your decision logic.  For more information, refer to the SAS Intelligent Decisioning documentation on Using Value Lists and Working with Segmentation Trees.

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
3 weeks ago
Updated by:
Contributors

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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