You are viewing the RapidMiner Studio documentation for version 8.1 - Check here for latest version
Set Data (RapidMiner Studio Core)
SynopsisThis operator sets the value of one or more attributes of the specified example.
The Set Data operator sets the value of one or more attributes of the specified example of the input ExampleSet. The example is specified by the example index parameter. The attribute name parameter specifies the attribute whose value is to be set. The value parameter specifies the new value. Values of other attributes of the same example can be set by the additional values parameter. Please note that the values should be consistent with the type of the attribute e.g. specifying a string value is not allowed for an integer type attribute.
- example set input (Data Table)
This input port expects an ExampleSet. It is the output of the Retrieve operator in the attached Example Process.
- example set output (Data Table)
The ExampleSet with new values of the selected example's 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.
- example_indexThis parameter specifies the index of the example whose value should be set. Please note that counting starts from 1. Range: integer
- attribute_nameThis parameter specifies the name of the attribute whose value should be set. Range: string
- count_backwardsIf set to true, the counting order is reversed. The last example is addressed by index 1, the second last example is addressed by index 2 and so on. Range: boolean
- valueThis parameter specifies the new value of the selected attribute (selected by the attribute name parameter) of the specified example (specified by the example index parameter). Range: string
- additional_valuesThe values of other attributes of the same example can be set by this parameter. Range:
Introduction to the Set Data operator
The 'Golf' data set is loaded using the Retrieve operator. A breakpoint is inserted here so that you can view the data set before application of the Set Data operator. You can see that the value of the Temperature and Wind attributes is '85' and 'false' respectively in the first example. The Set Data operator is applied on the 'Golf' data set. The example index parameter is set to 1, the attribute name parameter is set to 'Temperature' and the value parameter is set to 50. Thus the value of the Temperature attribute will be set to 50 in the first example. Similarly, the value of the Wind attribute in the first example is set to 'fast' using the additional values parameter. You can verify this by running the process and seeing the results in the Results Workspace. Please note that a string value cannot be set for the Temperature attribute because it is of integer type. An integer value can be specified for the Wind attribute (nominal type) but it will be stored as a nominal value.