Filtering and sorting rules#

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

The Filter/Sort pane

This pane is divided into several areas:

  • The ruleset metadata list encloses all the ruleset metadata available for filter/sort operations.

  • Operations panel where the query operation actually takes place.

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

Operations of filtering and sorting on the ruleset are not performed, as in the Data Manager task, on the real attributes and outputs but on its metadata.

Metadata quantities are dynamically generated quantities evaluated at runtime and derived from the basic structure of the ruleset. They are related to the data structure type.

Tip

Metadata chips 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 Operations panel.

To sort metadata in your ruleset, follow the guidelines down below:

Procedure

  1. Drag one of the metadata from the metadata list onto the Sort area.

  2. Observe as the corresponding chip appears in the Sort area. The spreadsheet tables of your ruleset will be now ordered in ascending order based on the metadata selected.

Note

Please remember that a sort icon will appear next to the sorted column header to remind you of the actual ordering criterion.


Operations panel#

The Filter and Sort areas in the Operations panel enable users to apply filter and sort queries to the underlying ruleset.

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

  • the description provided in the pre-filter or post-filter sections exhibits the same internal functioning of the Rule Manager’s Filter area.

  • the description provided in the sort section exhibits the same internal functioning of the Rule Manager’s Sort area.

The specific options available in the Filter and Sort areas of the Rule Manager will be covered here.

By default, Filter queries are applied at rule level. However, there are some metadata, such as the attribute ones, which operate at condition level. Standard functioning establishes that a rule is discarded by the applied filter query only if none of its conditions fulfill the query constraints.

By using the Filter condition checkbox, you can change this functionality, and erase all the conditions which do not meet the query constraints while retaining the rule. In this way, you are simply reducing the number of considered conditions for each rule.

Likewise, in the Sort area, 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 drop-down menu located just below the Sort 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 least one.

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


The Rules attributes list#

Just below the metadata list, you can find the Rules attributes list, which is for informational purposes only. This list provides in a unique place an overview of all the attributes and outputs used in the current dataset.

You can switch between attributes and outputs views by clicking on the vertical button toolbar positioned next to the Rules attributes list.

See also

Both lists resemble the Data Manager’s Attribute list in a read-only mode. They can be ordered by using the various criteria listed in the drop-down menu located at the bottom of each list.

The same lists are the ones available in the following wizards: