Create a Rule Flow by Using Discovery Techniques

About the Discovery Techniques

With the New Discovery wizard, you can use discovery techniques to define vocabularies, terms, rule sets, and rule flows. The discovery techniques that you can select from are:
Decision Tree
Decision Tree analysis produces a tree-like structure in which each branch of the tree represents a possible decision or event. The tree structure shows how one choice leads to the next. Each branch represents a mutually exclusive option. Decision trees are often used for data segmentation or prediction modeling. You can create decision trees to classify observations based on the values of nominal, binary, or ordinal targets or to predict outcomes for interval targets.
Note: With the Decision Tree technique, input columns with a SAS datetime format or a date format other than MONTHw. and WEEKDAYw. are excluded from the rule discovery process.
Scorecard
Scorecards provide a quantitative score of the odds that a customer will display a defined behavior such as respond positively to a campaign, make a purchase, default on a loan, and so on. The higher the score, the more likely the defined behavior will occur. The SAS Decision Manager Scorecard uses the Weight of Evidence technique to generate scores.
Note: With the Scorecard technique, input columns with a SAS datetime format or a date format other than MONTHw. and WEEKDAYw. are excluded from the rule discovery process.
Recency Frequency Monetary (RFM)
RFM is a technique that is used to identify existing customers who are most likely to respond to a new campaign or product offer. RFM analysis looks at when a customer last placed an order or bought something, how often the customer makes a purchase, and how much money they spend. Customers are assigned scores based on these factors.
Market Baskets
Market Basket analysis is used to predict items that are most likely to be purchased together. Market Basket analysis can be used to predict what items a customer is likely to buy.

Create a Rule Flow by Using the New Discovery Wizard

When you run the New Discovery wizard, it uses the discovery technique that you select to generate a rule flow and as many rule sets as are needed. If you do not select an existing vocabulary, the wizard also generates a vocabulary.
Note: The New Discovery wizard produces temporary data sets during the rule discovery process. Do not delete these temporary data sets before you attempt to import the results of the rule discovery process. If you delete these temporary data sets, you cannot import the generated rule sets.
To create a rule flow using the New Discovery wizard:
  1. Select the Business Rulesthen selectRule Flows category.
  2. Right-click on the folder where you want to create the new rule flow, and select New Rule Flow. Alternatively, select the folder where you want to add the new rule flow, click New, and select New Rule Flow. The New Rule Flow window appears.
  3. Enter a name for the new rule flow. Rule flow names are limited to 32 characters and can contain any character except forward slash (/), backslash (\), left brace ({), right brace (}), colon (:), and question mark (?).
    Note: The name that you enter is also used for the vocabulary name if you do not select an existing vocabulary. Vocabulary names must be unique within the SAS Decision Manager database. Rule flow names can contain spaces but vocabulary names cannot. If the name you enter contains a space, it is converted to an underscore in the vocabulary name.
  4. (Optional) Enter a description for the new rule flow. Descriptions are limited to 256 characters.
  5. (Optional) Select Create output only for records that fire rules to limit the output of the rule flow. By default, all output records are written to the output data set. However, for some types of applications, only the output records for which at least one rule has fired are of interest. Limiting output is useful for applications that detect outliers, such as applications that detect fraud.
  6. Select Use discovery techniques to generate rules.
  7. Either select an existing vocabulary or select Create a vocabulary.
    Note: If you select an existing vocabulary, and the discovery process generates a vocabulary that has a term with the same name but a different data type, you cannot import the rules that are generated.
  8. Click Create. SAS Decision Manager opens the New Discovery window.
  9. Select the Discovery technique. The techniques that are available depend on the products that are licensed at your site. The Recency Frequency Monetary (RFM) technique is available with Base SAS. The Decision Tree and Scorecard techniques require a SAS/STAT license. The Market Baskets technique requires a SAS Enterprise Miner license.
  10. Select the Data source that you want to use for the discovery analysis.
    Note: You cannot use the Market Baskets discovery technique with data sources that contain values for the Item term that do not conform to the SAS name rules for the VALIDVARNAME=V7 system option. See SAS System Options: Reference for more information.
  11. Select the setup options for the discovery technique, and click Next. The setup options depend on the technique. See Setup Options and Terms for Discovery Techniques.
  12. Select the action terms that are required for the discovery technique. See Setup Options and Terms for Discovery Techniques.
    Note: If you specified an existing vocabulary in Step 7, and the action terms that you select are excluded from the output data, the rule flow will not run. See Create a Term for more information.
    For the RFM and Market Baskets techniques, skip to Step 14.
  13. For the Decision Tree and Scorecard discovery techniques, select the input variables that you want to be used as condition terms in the rule flow. Select the terms and click add to move them to the Conditions list.
  14. Click Run to run the analysis. SAS Decision Manager displays the rule sets that were generated by the analysis. You should check the SAS log before importing the data.
  15. Click Import to import the data. If the data was imported successfully, SAS Decision Manager displays a confirmation message telling you what data was imported and which folder it was added to.
  16. (Optional) Click Rule_generation_log and Rule_import_log to download the log files to your local machine. The log filename is RuleFlowName_generation.log, and the import log filename is RuleFlowName_import.log. If rules cannot be generated or the import process fails, the log files contain detailed error messages.
  17. Click Close to close the New Discovery wizard. SAS Decision Manager opens the new rule flow in the rule flow editor and displays the Rule Sets page.
After using the New Discovery wizard to generate and import a new rule flow, all of the rule set versions in the rule flow will be unlocked, latest versions. When you publish the rule flow, SAS Decision Manager automatically locks any unlocked rule sets. See Lock a Rule Set Version and Step 11 in Create a Rule Flow Using the Rule Flow Editor for more information.
Setup Options and Terms for Discovery Techniques
Discovery Technique
Setup Variables
Action Terms
Decision Tree
Maximum number of rules: Select the maximum number of rules that you want to be generated from the discovery analysis.
Select the terms whose values you want to predict, and click add to move them to the Actions list.
Scorecard
Minimum points: The scorecard points are scaled with this option as the minimum value. You can specify any nonnegative integer.
Maximum points: The scorecard points are scaled with this option as the maximum value. You can specify any positive integer that is greater than the Minimum points value.
Target variable: specifies the variable that you are modeling. The variable must have exactly two discrete values such as 0 and 1 or True and False.
Target category: specifies how the values of the target variable are mapped. The scorecard points are scaled to the likelihood of the two target variable values based on the sort order. Select High to indicate that the highest lexical value of the target variable is mapped to the Maximum points value. Select Low to indicate that the lowest lexical value of the target variable is mapped to the Maximum points value.
Recency Frequency Monetary
Select the binning method.
Independent: Simple ranks are assigned to recency, frequency, and monetary values. The three ranks are assigned independently.
Nested: A simple rank is assigned to recency values. Within each recency rank, customers are then assigned a frequency rank. Within each frequency rank, customer are assigned a monetary rank.
Customer ID: specifies a numeric or character term that uniquely identifies a customer.
Transaction date: specifies the transaction date.
Transaction amount: specifies the transaction amount.
Market Baskets
Maximum number of rules: Select the maximum number of rules that you want to be generated from the discovery analysis.
ID: specifies the customer ID.
Item: specifies the item that was purchased.
Last updated: February 22, 2017