How to: Filter a Rule

In Microsoft SQL Server Analysis Services, you can filter the rules that are displayed on the Rules tab of the Microsoft Association Rules Viewer. By filtering, you can restrict the results to just the associations that interest you. For example, you can filter the rules to show only those that include a specific product. For more information about how to work with association models in the custom viewer, see Viewing a Mining Model with the Microsoft Association Rules Viewer. For a walkthrough of how to build and explore an association model, see the tutorial, Lesson 3: Building a Market Basket Scenario (Intermediate Data Mining Tutorial).

Note

This option is available only for mining models that have been created by using the Microsoft Association Algorithm.

To filter a rule

  1. Open the mining model by using the Association Rules Viewer. To do this in SQL Server Management Studio, right click the model name and select Browse. to do this in Business Intelligence Development Studio, double-click the mining structure that contains the model, and then click the Mining Model Viewer tab of Data Mining Designer

  2. Click the Rules tab of the Association Rules Viewer.

  3. Type a rule condition into the Filter Rule box.

    The Filter Rule text box supports regular expressions as defined by the .NET language. Therefore, you can use expressions such as the following: ((.Helmets.*Fenders.*)|(.*Fenders.*Helmets.*)). This expression would return any itemsets that include attributes with the words Helmets and Fenders, in any order.

  4. For Minimum probability, increase the value of probability to see fewer rules, or decrease the value to see more rules.

  5. For Minimum importance, increase the value of importance to see fewer rules, or decrease the value to see more rules.

  6. For Show, select one of the following options: Show attribute name and value, Show attribute name only, or Show attribute value only.

  7. For Maximum rows, increase the value to increase the total number of rules that meet the specified conditions, or decrease the value to limit the number of rules returned. Rules are ordered by probability, so you might eliminate additional rules that meet the specified conditions for probability or importance.

  8. Select or deselect the Show long name check box to toggle the way that the rules names are displayed..

    The rules are now filtered to only display the rules that contain the indicated item. The filter condition applies to attribute values either before or after the rule delimiter, "->".

    Note

    The viewer caches the initial list of rules, based on a query to the mining model, and does not refresh the list of rules unless you change the conditions of the query by setting the maximum rows, the probability, importance, or the display of long names. Therefore, if you type a condition and the display does not immediately refresh, you can force the viewer to refresh the data by selecting and then deselecting the Show long names check box.

See Also

Other Resources