Categories

Versions

Text to Nominal (Blending)

Synopsis

This operator changes the type of selected text attributes to nominal. It also maps all values of these attributes to corresponding nominal values.

Description

The Text to Nominal operator converts all text attributes to nominal attributes. Each text value is simply used as a nominal value of the new attribute. If the value is missing in the text attribute, the new value will also be missing.

Input

  • table input (Data Table)

    This input port expects an ExampleSet. It is the output of the Subprocess 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. The ExampleSet should have at least one text attribute because if there is no such attribute, the use of this operator does not make sense.

Output

  • table output (Data Table)

    The selected text attributes are converted to nominal and the resultant ExampleSet 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 View.

Parameters

  • type

    This parameter can be used to decide whether to include or exclude the selected Attributes.

    • include attributes: This is the default option. It configures the Operator to keep the selected Attributes and remove the remainder.
    • exclude attributes: This leads to the inverse behaviour. It configures the Operator to remove the selected Attributes and keep the remainder.

    This also applies to special attributes if the also apply to special attributes (id, label..) parameter is set to true.

  • attribute filter type

    This parameter allows you to select the Attribute selection filter; the method you want to use for selecting Attributes. It has the following options:

    • all attributes: This option selects all the Attributes of the ExampleSet, no Attributes are removed. This is the default option
    • one attribute: This option allows the selection of a single Attribute. The Attribute is selected by the select attribute parameter.
    • a subset: This option allows the selection of multiple Attributes through a list (see parameter select subset). If the meta data of the ExampleSet is known all Attributes are present in the list and the required ones can easily be selected.
    • regular expression: This option allows you to specify a regular expression for the Attribute selection. The regular expression filter is configured via the parameters expression and exclude expression.
    • type(s) of values: This option allows the selection of Attributes of particular type(s). The value type filter is configured via the parameter type of value.
    • no missing values: This option selects all Attributes of the ExampleSet which do not contain a missing value in any Example. Attributes that have even a single missing value are removed.
  • select attribute

    The required Attribute can be selected from this option. The Attribute name can be selected from the drop down box of the parameter if the meta data is known. Otherwise, the attribute name can be typed in manually.

  • select subset

    The required Attributes can be selected from this option. This opens a new window with two lists. All Attributes are present in the left list, if the meta data is known. They can be shifted to the right list, which is the list of selected Attributes that will make it to the output port. If the meta data is unknown, you can manually type in attribute names and use the green plus-button to add them to the list of selected attributes.

  • expression

    Attributes whose names match this expression will be selected. The expression can be specified through the button on the right that will open the "Edit Regular Expression" menu. This menu gives a good idea of regular expressions and it also allows you to try different expressions and preview the results simultaneously.

  • exclude expression

    This option allows you to specify a regular expression. Attributes matching this expression will be filtered out even if they match the first expression (expression that was specified via the expression parameter).

  • type of value

    This option allows to select Attribute types. A subset of the following types can be chosen: real, integer, date-time, time, binominal, non-binominal.

  • also apply to special attributes (id, label..)

    Special Attributes are Attributes with roles (e.g. id, label..). By default all special Attributes are delivered to the output port regardless of the conditions in the Select Attributes Operator. If this parameter is set to true, special Attributes are also tested against the specified conditions and only those Attributes are selected that match the conditions.

Tutorial Processes

Introduction to the Text to Nominal operator

This Example Process starts with the Subprocess operator which provides an ExampleSet. A breakpoint is inserted here so that you can have a look at the ExampleSet. You can see that the ExampleSet has three text attributes i.e. 'att1', 'att2' and 'att3'. The Text to Nominal operator is applied on this data set. The attribute filter type parameter is set to 'one attribute' and the select attribute parameter is set to 'att1'. Thus, this operator converts the type of the 'att1' attribute from text to nominal. You can verify this by seeing the results in the Statistics Tab in the Results View.