Categories

Versions

You are viewing the RapidMiner Studio documentation for version 10.0 - Check here for latest version

Rename (Blending)

Synopsis

This operator can be used to rename one or more attributes of an ExampleSet.

Description

The Rename operator is used for renaming one or more attributes of the input ExampleSet. Please keep in mind that attribute names must be unique. The Rename operator has no impact on the type or role of an attribute. For example, imagine you have an attribute named 'alpha' of integer type and regular role. Renaming the attribute to 'beta' will just change its name. It will retain its type integer and role regular. To change the role of an operator, use the Set Role operator. Many type conversion operators are available for changing the type of an attribute at 'Data Transformation/Type Conversion'.

Input

  • example set (Data Table)

    This input port expects an ExampleSet. It is the output of the Retrieve operator in the attached Example Process. The output of other operators can also be used as input. It is essential that meta data should be attached with data for input because attributes are specified in its meta data. The Retrieve operator provides meta data along-with data.

  • dictionary (Data Table)

    This optional input port expects a dictionary (an ExampleSet with two attributes holding the old and new names). When the dictionary port is connected the 'from attribute' and 'to attribute' parameters become mandatory. The dictionary is used as a mapping from old to new attribute names.

Output

  • example set (Data Table)

    The ExampleSet with renamed attributes is output of this port.

  • original (Data Table)

    The ExampleSet that was given as input is passed without changing to the output through this port. This is usually used to reuse the same ExampleSet in further operators or to view the ExampleSet in the Results Workspace.

Parameters

  • rename attributes This parameter is available if and only if the dictionary port is not connected. To rename one or more attributes click on the Edit List button. Here you can select attributes and assign new names to them. Range: string
  • from attribute This parameter is available if and only if the dictionary port is connected. It specifies the attribute in the dictionary that holds the old attribute names. Range: string
  • to attribute This parameter is available if and only if the dictionary port is connected. It specifies the attribute in the dictionaries that holds the new attribute names. Range: string

Tutorial Processes

Renaming multiple attributes

The 'Golf ' data set is used in this Example Process. The 'Play' attribute is renamed to 'Game' and the 'Wind' attribute is renamed to '#*#'. The 'Wind' attribute is renamed to '#*#', just to show that special characters can also be used to rename attributes. However, attribute names should always be meaningful and should be relevant to the type of information stored in them. Click on the first Rename operator at the top and then on the Edit List button to see how the renaming can be done.

Alternatively you can specify old and new attribute names via an ExampleSet using the dictionary port. We create a dictionary ExampleSet with two attributes 'From' and 'To', holding the old and new attribute names. If you click on the second Rename operator at the bottom, you can see that we have specified the 'From' attribute to contain the old and the 'To' attribute to contain the new attribute names.