Filtering and sorting rules#

On the right side of the Rules tab, you can find the Rule filtering/sorting pane which controls query operations on the ruleset.

The Filter/Sort pane

This pane is divided into several areas:

  • The ruleset Metadata list which encloses all the ruleset metadata you can use in filter/sort operations.

  • Filter and Sort panels where the query operation actually takes place.

  • The Rule attributes list containing a summary about the attribute information contained into the ruleset.

Operation of filtering and sorting on the ruleset is not performed, as in the Data Manager task, on the real attributes and outputs used in the ruleset by on its metadata.

Metadata quantities are constructed quantities evaluated at runtime starting from the base structure of the ruleset. They are linked to the data structure type.

Tip

Metadata chip are angular bordered, while attribute chip are round bordered. This enables you to immediately identify the two groups.

Available Metadata for the ruleset are:

  • #condition: containing the number of conditions of each rule. The type of this metadata is integer.

  • attribute: containing the attribute name of each condition of each rule. The type of this metadata is nominal.

  • outputs: containing the output name of each rule. The type of this metadata is nominal.

  • covering: containing the total covering of each rule. The type of this metadata is percentage.

  • error: containing the total error of each rule. The type of this metadata is percentage.

  • rsample: containing the number of lines belonging to the output class of each rule. The type of this metadata is integer.

  • wsample: containing the number of lines not belonging to the output class of each rule. The type of this metadata is integer.

Metadata quantities are available for drag and drop operations from the Metadata list to the Filter and Sort panels.

Procedure

  1. Drag one of the Metadata contained in the Metadata List on the Sort drop area.

  2. The corresponding chip will appear in the Sort drop area.

  3. Spreadsheet tables will now be ordered in ascending order with respect to the Metadata selected. A sort icon will appear next to the column sorted header to remind you the ordering criterion present.


Filter and sort panel#

Filter and Sort allows the user to construct filter and sort queries on the underlying ruleset.

Their internal behavior is mostly similar to the same query areas present in the Data Manager task:

  • the description contained in the pre-filter or post-filter sections presents the internal behavior of the Rule Manager Filter area.

  • the description contained in the sort section presents the internal behavior of the Rule Manager Sort area.

Here we are going then to concentrate on the few different options which are unique for the Filter and Sort area in the Rule Manager.

By default, Filter queries are applied at rule level. However, there are some metadata as the attribute one which works at the level of the condition. Standard behavior tells a rule is discarded by the filter query if and only if all its conditions does not fulfill the query constraints.

By using the Filter condition checkbox, you can change this behavior, by erasing all the conditions which does not fulfill the query constraints even by retaining the rule. In this way you are simply reducing the number of considered conditions for each rule.

Likewise, in the Sort panel, sort criteria leads to a rule ordering. If you want to order instead conditions inside each rule, you have to use the Sort conditions by dropdown menu located just below the Sort drop area. Possible condition ordering criteria are:

  • Attribute: it orders the conditions according to the attribute index of the condition in the underlying data (default).

  • Covering: it orders the conditions by their impact on the rule covering, from the most important to the less one.

  • Error: it orders the conditions by their impact on the rule error, from the most important to the less one.


The Rules attributes pane#

Just below the Metadata list, you can find the Rules attributes pane which has information purposes only. It wants to communicate in a unique place all the attributes and the outputs used in the current dataset.

You can switch between Attributes and Outputs by clicking on the vertical button toolbar located next to the Attribute or Outputs list.

See also

Both the list are usual Attribute list in read-only mode. They can be ordered by using the criteria listed in the dropdown menu located at the bottom of each list. Refer to the linked page for further information.

The same lists are the one available in the following wizard: