Create Segmentation Tree From Table
create_segmentation_tree_from_tableConverts FICO-style strategy tables (TRIAD, Blaze) into SAS Intelligent Decisioning segmentation trees by ordering decision keys and assigning leaf outcomes.
Instructions
Build one segmentation tree from a strategy table: one row per branch, a column per decision key.
This is how a FICO-style strategy export (TRIAD, Blaze) becomes a SAS
Intelligent Decisioning tree. Decision keys are tested in the order of
key_columns; a key whose values do not differ within a subtree is
not tested there. Each leaf leads to an outcome that assigns the
row's outcome_columns.
With split="lower_bound" a key's value is the lower bound of a
range, as such exports write it: sibling values 0, 600, 630 become
>= 630, 600 to < 630 and, for the lowest, Other (missing values
included). With split="exact" each distinct value is its own branch.
The table comes from exactly one of rows (inline, small tables),
file_path (a CSV the server reads, gated by
ALLOW_LOCAL_FILE_UPLOAD) or caslib_name + table_name (a CAS
table — load an Excel sheet with upload_data first). Repeated column
names in a CSV get _2, _3.
The result reports what was built — leaves, split nodes, outcomes, and
rows whose path is identical but whose outcome differs (conflicts)
— not the tree itself, which can be hundreds of kilobytes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Tree name. | |
| rows | No | Inline rows, each an object of column to value. | |
| split | No | "lower_bound" (range lower bounds) or "exact" (values). | lower_bound |
| folder | No | Where to store the tree (and value lists): a folder path, ``My Folder``, a folder ID or URI. Omit to use the default folder; if there is none, ask the user. | |
| file_path | No | A CSV file the server reads. | |
| server_id | No | CAS server (default cas-shared-default). | cas-shared-default |
| table_name | No | The CAS table. | |
| caslib_name | No | Caslib of a CAS table to read. | |
| description | No | Optional description. | |
| key_columns | Yes | Decision key columns in strategy order. A column name, or ``{"column": ..., "variable": ...}`` to name the tree variable; two columns may test the same variable (a key that appears twice in the strategy). | |
| outcome_types | No | Data type per outcome column, overriding the one inferred from the values: ``{"Scenario Group": "string"}``. Types must match the decision variables the tree is mapped to. | |
| outcome_prefix | No | Prefix of outcome names (default: the first outcome column). | |
| outcome_columns | Yes | Columns the leaves assign, e.g. ["Scenario ID", "Scenario Group"]. | |
| row_label_column | No | Column that identifies a row in the report, e.g. the branch number. | |
| create_value_lists | No | Also create a value list per tested variable, holding the conditions its nodes use, and tie the variable to it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||