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
idrole acts as an identifier for the Examples. It should be unique for all Examples. Different Blending Operators (Join, Union, Transpose, Pivot, ...) use theidColumn to perform their tasks. - label: This is a special role. An Column with the
labelrole acts as a target Column for learning Operators. Thelabelis also often called 'target variable' or 'class'. - prediction: This is a special role. An Column with the
predictionrole is the result of an application of a learning model. The Apply Model Operator adds, for example, apredictionColumn to the Table. To evaluate the performance of a model, alabeland apredictionColumn is necessary. - cluster: This is a special role. An Column with the
clusterrole indicates the membership of Examples to a particular cluster. For example, the k-Means Operator adds a Column with theclusterrole. - weight: This is a special role. An Column with the weight role indicates the
weightof 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
batchrole indicates the membership of Examples to a specific batch. - outlier: This is a special role. An Column with the
outlierrole 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
scorerole indicates the quality of predictions. A prediction's confidence is one example of a possiblescore. - encoding: This is a special role. An Column with the
encodingrole 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 roleencoding. - interpretation: This is a special role. An Column with the
interpretationrole indicates, that its values are somehow derived from another Column. Often this is used in combination withprediction/scoreColumns. - source: This is a special role. An Column with the
sourcerole 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 thesourceColumn 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
metadatarole are ignored in learning processes but remain in the Table.