Skip to main content

Set Role

Synopsis

This Operator is used to change the role of one or more Columns.

Description

The role of a Column describes how other Operators handle this Column. The default role is regular, other roles are classified as special. The different types of roles are explained below in the parameter section.

An ExampleSet can have many special Columns and you can assign special Columns multiple times. This comes in handy, for example, if you want to feed the Columns into a learner that accepts multiple labels. However, please note that some operators expect the special roles to be unique and they might not know how to handle duplicate special roles.

Differentiation

Renaming Operators

There are several Operators for renaming Columns (e.g., Rename, Rename by Replacing, ...). Those only change the name of the Column and not its role.

Generate ID

This Operator creates a new Column with the special role id. In contrast to Set Role this Operator will overwrite an existing Column with the id role. Applying Set Role to change the role to regular will keep the original Column.

Input

example set

This input port expects a Table.

Output

example set

The Table with modified role(s) is output of this port.

original

The Table, that was given as input is passed through without changes.

Parameters

set roles

This parameter is used to set the roles of one or more Columns. A click on "gui.action.list.label" opens a menu with Column name and target role pairs. The role of an Column will be changed to the given target role for each of the pairs. Following target roles are possible:

  • regular: Columns without a special role. Regular Columns are used as input variables for learning tasks.
  • id: This is a special role. An Column with the id role acts as an identifier for the Examples. It should be unique for all Examples. Different Blending Operators (Join, Union, Transpose, Pivot, ...) use the id Column to perform their tasks.
  • label: This is a special role. An Column with the label role acts as a target Column for learning Operators. The label is also often called 'target variable' or 'class'.
  • prediction: This is a special role. An Column with the prediction role is the result of an application of a learning model. The Apply Model Operator adds, for example, a prediction Column to the Table. To evaluate the performance of a model, a label and a prediction Column is necessary.
  • cluster: This is a special role. An Column with the cluster role indicates the membership of Examples to a particular cluster. For example, the k-Means Operator adds a Column with the cluster role.
  • weight: This is a special role. An Column with the weight role indicates the weight of Examples with regard to the label. Weights are used in learning processes to set the importance of Examples. Weights can also be used to evaluate the performance of models; there they assign a severeness for misclassification of single Examples.
  • batch: This is a special role. An Column with the batch role indicates the membership of Examples to a specific batch.
  • outlier: This is a special role. An Column with the outlier role indicates how much of an outlier an Example can be considered. For example, the Detect Outlier (LOF) Operator creates a Column with this role. It is used, for example, to filter out Examples that are considered outliers.
  • score: This is a special role. An Column with the score role indicates the quality of predictions. A prediction's confidence is one example of a possible score.
  • encoding: This is a special role. An Column with the encoding role indicates, that it is a different representation of another Column. For example, a text Column could be represented as multiple numerical Columns. Each of the numerical Columns would be of the role encoding.
  • interpretation: This is a special role. An Column with the interpretation role indicates, that its values are somehow derived from another Column. Often this is used in combination with prediction/score Columns.
  • source: This is a special role. An Column with the source role indicates, that it is the origin for some other Column. It can also be used to identify Columns containing other resources, like images. In that case the source Column would contain a file path to an image.
  • metadata: This is a special role. It can be used to mark Columns that contain some information relevant to the user but irrelevant for learners. Columns with the metadata role are ignored in learning processes but remain in the Table.