Analyzing Classification LLM Rules in the Rule Viewer

The Rule Viewer is a visual tool for exploring rules, offering a wide range of information such as which rules are the most important, which attributes they involve, the relationship between classes of output attributes with respect to input attributes and so on.

The task can be used to analyze the ruleset generated by the Classification LLM task.


Prerequisites


Procedure

  1. Drag and drop the Rule Viewer task onto the stage.

  2. Connect a task, which contains the ruleset you want to analyze, to the new task.

  3. Double click the Rule Viewer task. The ruleset analysis is displayed as explained in the Results section below.

  4. Configure the options described in the Feature Ranking options table below.

  5. Click the Info icon to view the legend on how graphs are displayed.

  6. Click the bolt icon to export the rule viewer as a PNG image, or modify attribute space filters, such as:

    • increase or decrease the relevance threshold

    • sort attributes by a specific class.

    • modify the number of attributes displayed

The Rule Viewer task has an additional Documentation tab where you can document your task.


Results

A legend on the left hand side displays information such as the name of the output attribute for classification problems, the number of rules and how to read the colors in the graph.

Only the first n attributes are displayed according to the number of attributes to be displayed value. Consequently if you hover over a rule where one of its conditions is related to an attribute that is not within this initial number, the corresponding link will not be displayed, and a yellow warning box is displayed in the bottom right-hand corner of the screen.

The graph itself is divided into two separate parts:

  • an internal space, which displays the rules

  • an external space, which displays the attributes included in the rules. 

Description

Screenshot

Internal space

The internal rules space contains a chart where every circle correspond to a rule:

  • the covering (see the Rule Manager page for details) of each rule is proportional to the size of the circle

  • the hole inside the circle corresponds to its error committed

  • the color of the circle is the same as the output class color, defined in the legend.

The whole ruleset is divided into subset of circles which contain the rules with the same output class. The whole internal rules space is interactive:

  • Hover over the circle containing the subset of rules, and the number of rules the class contains will be displayed under the legend on the left.
    This may be useful when there are many rules for a single class.

  • Hover over a single rule circle and all the values contained in its conditions are highlighted and graphically connected to the circle. 

  • The relevance of the condition can be understood by its transparency.
    For example, if the class color is green for true, the more relevant the condition, the deeper the green of the connecting lines, and vice versa.

  • Details on the conditions contained in the rule are displayed below the legend on the left.

External space

The attributes ring is an ordered pie chart where each slice represents an input attribute. A slice is usually made up of several sections, representing the distinct values that the attribute it belongs to may assume, within the whole ruleset.
The order is clockwise and starts from the attribute at the top of the chart (at 12 o’clock), The attributes with the highest relevance are displayed first, i.e. from 1 o' clock on (see the Feature Ranking page for details). The attribute space is highly interactive:

  • Click on an attribute name or its variable type icon and the selected slice expands, so you can see have a closer look at its distinct values.
    Re-click the slice and it will go back to its original visualization.

  • Hover over an attribute name or its variable type icon and information is displayed on the relevances of the attribute according to the classes defined in the legend.
    The highlighted rules are those where the attribute is used in at one of the rules' conditions.

  • However over a specific section of the slice and information is displayed on that set of values for the attribute. 
    The color of the section is related to the output class color of the rules which it primarily satisfies.
    The level of transparency expresses the relevance of the attribute itself.
    Again the highlighted rules are those where the attribute is used in at one of the rules' conditions.