Saving Selection and Scoring Rules

You can save case selection or scoring rules in an external file and then apply those rules to a different data source. The rules are based on the selected nodes in the Tree Editor.

Syntax. Controls the form of the selection rules in both output displayed in the Viewer and selection rules saved to an external file.

  • IBM® SPSS® Statistics. Command syntax language. Rules are expressed as a set of commands that define a filter condition that can be used to select subsets of cases or as COMPUTE statements that can be used to score cases.
  • SQL. Standard SQL rules are generated to select/extract records from a database or assign values to those records. The generated SQL rules do not include any table names or other data source information.

Type. You can create selection or scoring rules.

  • Select cases. The rules can be used to select cases that meet node membership criteria. For IBM SPSS Statistics and SQL rules, a single rule is generated to select all cases that meet the selection criteria.
  • Assign values to cases. The rules can be used to assign the model’s predictions to cases that meet node membership criteria. A separate rule is generated for each node that meets the node membership criteria.

Include surrogates. For CRT and QUEST, you can include surrogate predictors from the model in the rules. Rules that include surrogates can be quite complex. In general, if you just want to derive conceptual information about your tree, exclude surrogates. If some cases have incomplete independent variable (predictor) data and you want rules that mimic your tree, include surrogates. See the topic Surrogates for more information.

To save case selection or scoring rules:

  1. Select the nodes in the Tree Editor. To select multiple nodes, use Ctrl-click. (For more information on selecting multiple nodes, see Tree Model Editor.)
  2. From the menus choose:

    Rules > Export...

  3. Select the type of rules you want and enter a filename.

Note: If you apply rules in the form of command syntax to another data file, that data file must contain variables with the same names as the independent variables included in the final model, measured in the same metric, with the same user-defined missing values (if any).