Convert Dataset to Ruleset¶
There are two main scenarios in which the Convert Dataset to Ruleset task is most frequently used:
When it is needed to quickly add numerous heuristic rules into a flow. The rules can be entered into a table, which can then be imported into a flow as a dataset, and then converted into a ruleset.
When a ruleset has already been converted into a dataset, using the Convert Ruleset to Dataset task, in order to perform in-depth analysis in the Data Manager, and you now want to reconvert the task back to a ruleset format.
The task is made of one tab only, the Options tab.
Warning
It is required that the dataset is written clearly and that the information to provide in the Options tab is stored properly in the attributes. The dataset must contain, at least:
At least one attribute containing rule conditions,
an output name attribute,
an output value attribute,
a covering attribute,
an error attribute,
a rule ID attribute.
Tip
When the rule conditions contain one value with the . within it, we recommend you to enclose the condition within “”, otherwise the value will be cut after the ..
The Options tab¶
The Options tab is the place where all the options for an effective conversion can be set. It is made of three areas: the Available attributes list, the Rule conditions area, and the rule options pane.
The Available attributes list contains the dataset’s attributes. To know more about this option, go to the corresponding page.
The Rule conditions (NOMINAL) area is provided to drag the attributes containing the rule conditions. All the attributes’ type must be nominal. Instead of manually dragging and dropping attributes, they can be defined via a filtered list.
- In the rule options pane, users will find the following attribute drop down lists:
Rule output name attribute: select the attribute in the dataset that contains the output attributes.
Rule output value attribute: select the attribute in the dataset that contains the output attribute values.
Rule covering attribute: select the attribute in the dataset that contains the covering value.
Rule error attribute: select the attribute in the dataset that contains the error value.
Rule ID attribute: select the attribute in the dataset which contains the ID for each rule. These numbers must be unique and consecutive, and no empty cells must be present in the dataset.
Warning
All the parameters listed above are mandatory.
Example¶
The following example uses the Dataset with rules dataset.
In this example, we want to convert a dataset, which has been created according to the directions provided above, into a dataset.
- After having imported the dataset, add a Convert Dataset to Ruleset task to the flow, and configure the options as follows:
Rule conditions: Condition 1, Condition 2, Condition 3
Rule output name attribute: Output attribute
Rule output value attribute: Output value
Rule covering attribute: Covering %
Rule error attribute: Error %
Rule ID attribute: Id rule
Save and compute the task.
Drag a Rule Manager task onto the stage and link it to the Convert Dataset to Ruleset task to visualize the results.