Set Role (RapidMiner Studio Core)
SynopsisThis Operator is used to change the role of one or more Attributes.
The role of an Attribute describes how other Operators handle this Attribute. The default role is regular, other roles are classified as special. An ExampleSet can have many special Attributes, but each special role can only appear once. If a special role is assigned to more than one Attribute, all roles will be changed to regular except for the last Attribute. The different types of roles are explained below in the parameter section.
There are several Operator for renaming Attributes (e.g., Rename , Rename by Replacing, ...). Those only change the name of the Attribute and not its role.
This Operator creates a new Attribute with the special role id. In contrast to Set Role this Operator will overwrite an existing Attribute with the id role. Applying Set Role to change the role to regular will keep the original Attribute.
- example set (Data Table)
This input port expects an ExampleSet.
- example set (Data Table)
The ExampleSet with modified role(s) is output of this port
- original (Data Table)
The ExampleSet, that was given as input is passed through without changes.
The name of the Attribute which role should be changed. The name can be selected from the dropdown menu or manual typed.Range:
The target role of the selected Attribute is the new role assigned to it. Following target roles are possible:
- regular: Attributes without a special role. Regular Attributes are used as input variables for learning tasks.
- id: This is a special role. An Attribute 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, ...) uses the id Attribute to perform their tasks.
- label: This is a special role. An Attribute with the label role acts as a target Attribute for learning Operators. The label is also often called 'target variable' or 'class'.
- prediction: This is a special role. An Attribute with the prediction role is the result of an application of a learning model. The Apply Model Operator adds for example a prediction Attribute to the ExampleSet. To evaluate the performance of a model, a label and a prediction Attribute is necessary.
- cluster: This is a special role. An Attribute with the cluster role indicates the membership of an ExampleSet to a particular cluster. For example the k-Means Operator adds an Attribute with the cluster role.
- weight: This is a special role. An Attribute with the weight role indicates the weight of the 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 severness for misclassification of single Examples.
- batch: This is a special role. An Attribute with the batch role indicates the memebership to a specific batch.
- user defined: Any role can be assigned to an Attribute by typing in the textbox. User defined roles are special roles, so one specific role cannot be assigned to more than one Attribute. Attributes with user defined roles are ignored in learning processes. So an Attribute with a user defined role is ignored in a learning processes but remains in the ExampleSet.
This parameter is used to set the role of more than one Attribute at once. A click on Edit List opens a menu with Attribute name and target role pairs. They can be used in the same way as the above described parameters.Range:
Set Role on Titanic Data Set
This tutorial Process shows the basic usage of the Set Role Operator. First the Titanic data set is retrieved from the Samples folder. Then the role of several Attributes are set. An explanation is given of which Attribute is set to which role and the reason for that is given in the comments.