Rename by Constructions (RapidMiner Studio Core)
SynopsisThis operator renames the regular attributes of an ExampleSet by their construction descriptions if available.
The Rename by Constructions operator replaces the names of regular attributes of the given ExampleSet by their corresponding construction descriptions if the attribute was constructed at all. Please study the attached Example Process for better understanding.
Please keep in mind that attribute names must be unique. The Rename by Constructions operator has no impact on the type or role of an attribute. For example if 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'.
- example set input (Data Table)
This input port expects an ExampleSet. It is the output of the Write Constructions 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 the data for the input because attributes are specified in their meta data.
- example set output (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.
Renaming attributes by their construction descriptions
This Example Process shows how the Rename by Constructions operator can be used for renaming attributes. The 'Sonar' data set is loaded using the Retrieve operator. The Rename by Generic names operator is applied on this ExampleSet to rename the attributes with the generic stem 'att'. This ExampleSet is provided as input to the Write Constructions operator. The attribute constructions file parameter is set to 'D:\attributes' thus a file named 'attributes' is created (if it does not already exist) in the 'D' drive of your computer. You can open the written file and make changes in it (if required). A breakpoint is inserted here so that you can have a look at the constructions file. You can see that each line in the file holds the construction description of one attribute. You can see that the attribute names are of the form att1, att2 and so on. The attribute constructions are of the form attribute_1, attribute_2 and so on. The Rename by Constructions operator is applied on this ExampleSet. This operator will replace the attribute names by the attribute constructions. Which means that the attributes that are currently named as att1, att2 etc will be renamed to attribute_1, attribute_2 etc. You can verify this by viewing the resultant ExampleSet in the Results Workspace.