Skip to main content

Set Role

Synopsis

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

Description

The role of an Attribute describes how other Operators handle this Attribute. 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 Attributes and you can assign special Attributes multiple times. This comes in handy, for example, if you want to feed the Attributes 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 Operator for renaming Attributes (e.g.,Rename,Rename by Replacing, ...). Those only change the name of the Attribute and not its role.

Generate ID

This Operator creates a new Attribute with the special roleid. In contrast toSet Rolethis Operator will overwrite an existing Attribute with theidrole. ApplyingSet Roleto change the role toregularwill keep the original Attribute.

Input

example set

预计一个ExampleSet这个输入端口。

Output

example set

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

original

The ExampleSet, 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 Attributes. A click onEdit Listopens a menu with Attribute name and target role pairs. The role of an Attribute will be changed to the given target role for each of the pairs. Following target roles are possible:

  • regular: Attributes without a special role. Regular Attributes are used as input variables for learning tasks.
  • id:这是一个特殊的角色。An Attribute with theidrole acts as an identifier for the Examples. It should be unique for all Examples. Different Blending Operators (Join, Union, Transpose, Pivot, ...) uses theidAttribute to perform their tasks.
  • label:这是一个特殊的角色。An Attribute with thelabelrole acts as a target Attribute for learning Operators. Thelabelis also often called 'target variable' or 'class'.
  • prediction:这是一个特殊的角色。An Attribute with thepredictionrole is the result of an application of a learning model. The Apply Model Operator adds, for example, apredictionAttribute to the ExampleSet. To evaluate the performance of a model, alabeland apredictionAttribute is necessary.
  • 集群:这是一个特殊的角色。An Attribute with the cluster role indicates the membership of Examples to a particular cluster. For example, the k-Means Operator adds an Attribute with the cluster role.
  • weight:这是一个特殊的角色。An Attribute 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:这是一个特殊的角色。An Attribute with the batch role indicates the membership of Examples to a specific batch.
  • outlier:这是一个特殊的角色。An Attribute with the outlier role indicates how much of an outlier an Example can be considered. For example, the Detect Outlier (LOF) Operator creates an Attribute with this role. It is used, for example, to filter out Examples that are considered outliers.
  • score:这是一个特殊的角色。An Attribute with the score role indicates the quality of predictions. A prediction's confidence is one example of a possible score.
  • encoding:这是一个特殊的角色。在一个属性coding role indicates, that it is a different representation of another Attribute. For example, a text Attribute could be represented as multiple numerical Attributes. Each of the numerical Attributes would be of the role encoding.
  • interpretation:这是一个特殊的角色。An Attribute with the interpretation role indicates, that its values are some type of derived sense of another column. Often this is used in combination with prediction/score Attributes.
  • source:这是一个特殊的角色。An Attribute with the source role indicates, that it is the origin for some other Attribute. It can also be used to identify columns containing other resources, like images. In that case the source Attribute would contain a file path to an image.
  • metadata:这是一个特殊的角色。It can be used to mark Attributes that contain some information relevant to the user but irrelevant for learners. Attributes with a metadata role are ignored in learning processes but remain in the ExampleSet.