The Rule Manager¶
The Rule Manager allows you to inspect, manipulate and optimize a set of rules.
It displays the rules and their conditions in a spreadsheet layout.
It can be used after any task that generates ruleset. Some examples are:
The task is divided into two tabs, the Rules tab and the History tab:
The Rules tab: visualize the rules in spreadsheet form. Here you can add new ones or sort or filter them to catch the most important information.
The History tab: displays all the operations performed during the current session, and allows you to move or delete some of them.
See also
History management is in common with all the other Manager tasks. Therefore, the behavior of the History tab is explained in detail into manager task overview.
The Rules tab¶
In the Rules tab, rules are visualized and manipulated. The tab is divided in two macro areas:
On the left, the Rule filtering/sorting pane contains a graphical interface to investigate, filter and sort your underlying rules. We are going to enter into detail about this pane in a dedicated page.
- On the right, three spreadsheets presents from the top to the bottom:
Rule Conditions
Rule coverings
Rule errors.
On the bottom of the three tables, the Rule info bar contains the total number of rules present and displayed as well as the maximum number of conditions available.
Tip
The three spreadsheets contained on the right of the tab are connected together. Any selection performed by clicking on column header, index row or single cell in any of the three tables will automatically scroll and center the other two in the same table position to immediately highlight connected information.
Condition spreadsheet
In the top spreadsheet you have an overall visualization of your ruleset:
- Each row represents a single rule of your ruleset. We have respectively:
On the first column it is displayed the Number of conditions (#Cond) the rule is composed by.
On the second column it is displayed the Output of the considered rule in the format
<output name> = <output value>
.From the third column the various conditions are presented one for column.
Output column has a yellow background; it is ordered first by Output name and then by Output value.
The number of columns of the whole spreadsheet is <maximum number of conditions>+2
. If a single rule has fewer conditions than the maximum the rest of the column is left missing.
By right-clicking on the header row you can open the following context menu:
Sort ascending: it sorts the ruleset according to the selected columns in ascending order. Other spreadsheets are ordered consequently. The Rule filtering/sorting pane is filled with the sort metadata considered.
Sort descending: it sorts the ruleset according to the selected columns in descending order. Other spreadsheets are ordered consequently. The Rule filtering/sorting pane is filled with the sort metadata considered.
No sort: it clears the ordering on the selected columns if present. Ordering is erased also by the other spreadsheets. The Rule filtering/sorting pane is modified accordingly.
Clear all sorts: it restores the ordering to the original one for all the spreadsheet. It also clears completely the Sort pane in Rule filtering/sorting pane.
By right-clicking on the index column or on any of the first two columns of the table, you can open the following context menu:
Create rule: it adds a new rule at the rule at the end of the ruleset. Focus of the three table is moved at the end of each spreadsheet.
Delete selected rules: it deletes all the selected rules from the ruleset.
Change rule output: it allows the user to modify the Output name or the Output value through a dedicated wizard for the selected rules. In the first step of the wizard you are able to select the Output attribute among the present Outputs; in the second to select one of the values available for the selected Output.
Append condition: it adds a new condition for the selected rules at the end of each row. To configure the new condition the condition wizard is presented; more detail about this dialog box in the next section.
Delete selected conditions: it deletes all the selected conditions from the ruleset.
Copy selected conditions: it copies into the clipboard the code and the logical relation among the selected conditions.
Go to row: it scrolls and focus the three tables on the selected rule.
Tip
To copy into the clipboard condition codes and relations can be useful to study what-if scenarios in Data Manager task. Indeed, in Query Manager you can use the Paste conditions tool to filter the dataset according to some ruleset conditions. This will allow you to study the effect of particular rules on your dataset.
By right-clicking on any of the condition cell you will open a context menu with all the precedent entries of the index column case and with:
Edit condition: it allows you to change the considered condition in a new one. To configure the new condition the condition wizard is presented; more detail about this dialog box in the next section.
Hint
By directly editing the table, you can access to the following operation shortcuts (to start editing simply double-click on the considered cell):
By double-clicking on a cell of the Output column, you will trigger a Change rule output operation for the considered rule.
By double-clicking on a missing condition cell, you will trigger an Append condition operation for the considered rule.
By double-clicking on a filled condition cell, you will trigger an Edit condition operation for the selected condition of the considered rule.
Covering spreadsheet
In the middle spreadsheet, visualization of Rule covering is exposed:
- Each row represents a single rule of your ruleset. We have respectively:
On the first column it is displayed the Number of lines (#Patt) belonging to the Output class of the considered rule.
On the second column it is displayed the Total Covering for the whole rule.
From the third column the covering obtained by the whole rule without the considered condition is shown. This allows you to evaluate immediately the impact of each condition in the whole rule.
By right-clicking on the header row you can open the following context menu:
Sort ascending: it sorts the ruleset according to the selected columns in ascending order. Other spreadsheets are ordered consequently. The Rule filtering/sorting pane is filled with the sort metadata considered.
Sort descending: it sorts the ruleset according to the selected columns in descending order. Other spreadsheets are ordered consequently. The Rule filtering/sorting pane is filled with the sort metadata considered.
No sort: it clears the ordering on the selected columns if present. Ordering is erased also by the other spreadsheets. The Rule filtering/sorting pane is modified accordingly.
Clear all sorts: it restores the ordering to the original one for all the spreadsheet. It also clears completely the Sort pane in Rule filtering/sorting pane.
Moreover, you can start editing the Total Covering column to change and fix a particular covering statistic for the rule.
Attention
Since Covering is a percentage, please express your new statistic value as a number between 0
and 100
.
Error spreadsheet
In the bottom spreadsheet, visualization of Rule error is exposed:
- Each row represents a single rule of your ruleset. We have respectively:
On the first column it is displayed the Number of lines (#Patt) not belonging to the Output class of the considered rule.
On the second column it is displayed the Total Error for the whole rule.
From the third column the error obtained by the whole rule without the considered condition is shown. This allows you to evaluate immediately the impact of each condition in the whole rule.
By right-clicking on the header row you can open the following context menu:
Sort ascending: it sorts the ruleset according to the selected columns in ascending order. Other spreadsheets are ordered consequently. The Rule filtering/sorting pane is filled with the sort metadata considered.
Sort descending: it sorts the ruleset according to the selected columns in descending order. Other spreadsheets are ordered consequently. The Rule filtering/sorting pane is filled with the sort metadata considered.
No sort: it clears the ordering on the selected columns if present. Ordering is erased also by the other spreadsheets. The Rule filtering/sorting pane is modified accordingly.
Clear all sorts: it restores the ordering to the original one for all the spreadsheet. It also clears completely the Sort pane in Rule filtering/sorting pane.
Moreover, you can start editing the Total Error column to change and fix a particular error statistic for the rule.
Attention
Since Error is a percentage, please express your new statistic value as a number between 0
and 100
.
Configuring a new condition¶
Any time you want to Append a new condition or Edit an already present condition, the condition wizard is presented you to describe the properties of the new constraint.
The wizard is composed by two steps. You can navigate through the different wizard step by using the Back and Next button located in the bottom right corner of the opened panel. In the case of Edit condition operation, the wizard is opened directly on the second step by you can still navigate to the first step using the buttons.
In the first step, you need to select the attribute considered in the condition, chosen among all the attributes available in the underlying data.
Tip
The list of available attributes is always displayed in the Rules attributes pane.
The second step is used to define the new condition. The panel presented is equal to the condition panels used in the Query Manager to establish filters on the underlying data. For a detailed presentation of the above panels, we are going to refer you to the Data Manager documentation pages:
Summarizing, to add a new condition you can follow:
Procedure
In a Rule Manager task right-click on the blank header on top of the index column and select Create rule.
In the rule creation wizard first select one of the presented output, and then one of its available value.
In the new rule created, double-click on one of the missing cells in the condition columns. Analogously, you can right-click on the new rule row and select Append condition entry.
In the condition creation wizard first select one of the available attribute. This will be the attribute on which you are going to construct the condition.
Then configure the condition following description contained at this link.