Feature Ranking#

The Feature Ranking task provides a graphical representation of the importance of attributes within a class (Attribute Ranking) and the values within specific attributes (Value Ranking).


Feature Ranking layout#

The Feature Ranking task is divided into three panes:

  • The Attributes pane, where users can configure different options related to attributes.

  • The Customization pane, where users can customize different options.

  • The Ranking pane, where users can see a graphic visualization of the attributes according to different parameters.

Attributes pane

Within this pane, users can visualize some information and configure different attributes options.

This pane is divided into two sections:

  • Rules Attributes

    Within this section, users can visualize the attributes present in the rules for each class. Users can also select which output display through the Outputs drop-down menu. The attribute selected here will determine which attribute is displayed in the Value Ranking plot.

  • Displayed Relevances

    Users can decide whether they want to display plots that refer to:

    • all possible output values (Absolute)

    • to a single class (Relative for).

Customization pane

Within this pane, users can set the following options:

  • Enable multi-plot: if selected, a plot is displayed for each relevance selected in the Displayed Relevances options. This option is only available for nominal output values.

  • Order attributes by: users can select the criterion for sorting the values of each attribute. Possible choices are:

    • Relevance

    • Attribute index

    • Name

    • Type

  • Number of displayed attributes: it defines the maximum number of attributes displayed in the Attribute Ranking or Value Ranking plots.

  • Order relevances using absolute values: if selected, it orders attribute relevance in the Attribute Ranking plot according to their absolute values.

Ranking pane

This pane is divided into two tabs:

  • The Attribute Ranking tab, where users are able to see a graphic visualization of the importance of attributes within a class.

  • Within this tab, users are provided with a graphic visualization of the importance of attributes within a class. A bar plot displays values at the end of each bar.

    By hovering on the plot, users will find the following interactive icons:

    • Download plot as a png

    • Zoom

    • Pan

    • Box select

    • Lasso select

    • Zoom in

    • Zoom out

    • Autoscale

    • Reset axes

For more information about the above-mentioned plots, please refer to the Data Manager page.

  • The Value ranking tab, where users are able to see a graphic visualization of the values within specific attributes Within this tab, users are provided with a graphic visualization of the values within specific attributes. A bar plot displays values at the end of each bar.

    By hovering over the previously mentioned matrix, users will find the following customized plot visualization:

    • Download plot as a png

    • Zoom

    • Pan

    • Box select

    • Lasso select

    • Zoom in

    • Zoom out

    • Autoscale

    • Reset axes

For more information about the above-mentioned plots, please refer to the Data Manager page.


Example#

The following example uses the Adult dataset.

  • After having imported the dataset with the Import from Text File task, split the dataset into test and training sets (30% test and 70% training) with the Split Data task.

  • Add a LLM Classification task to the flow, specifying the Income attribute as Output attributes. Save and compute the task.

    https://cdn.rulex.ai/docs/Factory/feature-ranking-ex1.webp
  • Add a Feature Ranking task and double-click to open it.

  • The Attribute Ranking plot includes 10 attributes. The Attribute Ranking plot clearly shows that the education variable is the most important attribute in determining the output.

    https://cdn.rulex.ai/docs/Factory/feature-ranking-ex2.webp
  • If users choose to display only the attributes associated with an output, by selecting the Relative for: <=50K checkbox, the plot changes significantly and includes negative values, indicating that the attribute is inversely correlated with that output. When the Order relevances using absolute values checkbox is selected, the attributes are sorted according to the absolute value of relevance.

    https://cdn.rulex.ai/docs/Factory/feature-ranking-ex3.webp
  • Users can view the importance of each interval by clicking on the Value Ranking tab. In the example provided below, the relevance for the age attribute is shown in ascending order of importance.

    https://cdn.rulex.ai/docs/Factory/feature-ranking-ex4.webp