You are viewing the RapidMiner Studio documentation for version 8.2 - Check here for latest version
Generate Concatenation
(RapidMiner Studio Core)
Synopsis
This operator merges two attributes into a single new attribute by concatenating their values. The new attribute is of nominal type. The original attributes remain unchanged.Description
The Generate Concatenation operator merges two attributes of the input ExampleSet into a single new nominal attribute by concatenating the values of the two attributes. If the resultant attribute is actually of numerical type, it can be converted from nominal to numerical type by using the Nominal to Numeric operator. The original attributes remain unchanged, just a new attribute is added to the ExampleSet. The two attributes to be concatenated are specified by the first attribute and second attribute parameters.
Input
example set input (Data Table)
This input port expects an ExampleSet. It is the output of the Retrieve operator in the attached Example Process.
Output
example set output (Data Table)
The ExampleSet with the new attribute that has concatenated values of the specified 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
- first_attributeThis parameter specifies the first attribute to be concatenated. Range: string
- second_attributeThis parameter specifies the second attribute to be concatenated. Range: string
- separatorThis parameter specifies the string which is used as separation of values of the first and second attribute i.e. the string that is concatenated between the two values. Range: string
- trim_valuesThis parameter indicates if the values of the first and second attribute should be trimmed i.e. leading and trailing whitespaces should be removed before the concatenation is performed. Range: boolean
Tutorial Processes
Generating a concatenated attribute in the Labor-Negotiations data set
The 'Labor-Negotiations' data set is loaded using the Retrieve operator. A breakpoint is inserted here so that you can have a look at the ExampleSet. The 'vacation' and 'statutory-holidays' attributes will be concatenated to form a new attribute. The Generate Concatenation operator is applied on the Labor-Negotiations data set. The first attribute and second attribute parameters are set to 'vacation' and 'statutory-holidays' respectively. The separator parameter is set to '_'. Thus the values of the 'vacation' and 'statutory-holidays' attributes will be merged with a '_' between them. You can verify this by seeing the resultant ExampleSet in the Results Workspace. The 'vacation' and 'statutory-holidays' attributes remain unchanged. A new attribute named 'vacation_statutory-holidays' is created. The type of the new attribute is nominal.