Map


Synopsis

Maps certain values of an attribute to other values.


Description

This operator takes an ExampleSet as input and maps the values of certain attributes to other values. The operator can replace nominal values (e.g. replace the value "green" by the value "green_color") as well as numerical values (e.g. replace the all values "3" by "-1"). A single mapping can be specified using the parameters replace_what and replace_by. Multiple mappings can be specified in the parameter list value_mappings.

Additionally, the operator allows to define (and consider) a default mapping. If add_default_mapping is set to true and default_value is properly set, all values that occur in the example set but are not listed in the value mappings list are replaced by the default value. This may be helpful in cases where only some values should be mapped explicitly and many unimportant values should be mapped to a default value (e.g. "other").

If the parameter consider_regular_expressions is enabled, the values are replaced by the new values if the original values match the given regular expressions. The value corresponding to the first matching regular expression in the mappings list is taken as replacement.

This operator supports regular expressions for the attribute names, i.e. the value mapping is applied on all attributes for which the name fulfills the pattern defined by the name expression.


Input


Output


Parameters


ExampleProcess