Filtering Data in the Query Manager
Filtering consists in selecting a subset of cases that satisfy a condition specified by the user.
Changes you make can be committed run-time or on request.
Procedure
Drag and drop the attribute you want to filter by in any cell of the Filter column. More than one attribute can be added at a time.
Configure filter settings according to the type of the selected attribute. Filters can be defined specifying either a set of values, an interval or a relationship with another attribute.
If required create a conditional relationship with another attribute by dragging and dropping the relative attribute into another cell of the Filter column. By right-clicking any point of the Filter column, you can decide whether the conditions are to be satisfied simultaneously (And) or whether if it sufficient that at least one condition is satisfied (Or). The And or Or operators are applied to all conditions.
Conditions can be changed by double clicking on the corresponding cell in the Query Manager
Save and compute the task.
Filtering Examples
The examples are based on the Adult dataset.
Sample Datasets
Scenario data can be found in the Datasets folder in your Rulex installation.
Example 1
In the following example the filter has selected all the patterns that satisfy the condition age < 30 OR age > 70 and, age > education-num (the latter condition has no meaning from a practical point of view: it is only for illustration purposes).
Note that the priority is given to the operator inside the condition on values, so the whole condition can be written as:
(age < 30 OR age > 70) AND age > education-num
Example 2
In the second example the filter:
Selects the examples with workclass in the set {Federal-gov, Without-pay, Private}:
AND age < 50
AND sex = Male.
Note that the number of displayed patterns, shown at the top-left corner is changed.
In this case the conditions must be satisfied simultaneously since they are linked by the AND operator (note And displayed in the filter column header).
By right-clicking on one of the cells in the Filter columns it is possible to change the AND option by selecting the OR operator. For example, in this case the filter selects the examples with workclass in the set {Federal-gov, Without-pay, Private} OR age < 50 AND sex = Male. Now only one of these conditions needs to be satisfied. Note that Or is displayed in the filter column header and the number of selected rows (displayed in the top left hand pane) has increased considerably.