Skip to main content

Replace Infinite Values

Synopsis

这个操作符替换无限希利的价值观cted attributes by the specified replacements.

Description

The Replace Infinite Values operator replaces positive or negative infinite values by the specified replacements. The following replacements are available: none, zero, max_byte, max_int, max_double and missing. The 'max_byte', 'max_int', 'max_double' replacements replace positive infinity by the upper bound and negative infinity by the lower bound of the range of the byte, int and double Java types respectively. If 'missing' replacement is used then the infinite values are replaced by nan (not a number), which is internally used to represent missing values. These missing values can be replenished by the Replace Missing Values operator. Different replacements can be specified for different attributes by using thecolumnsparameter. If an attribute's name is not in the list of thecolumnsparameter, the replacement specified by thedefaultparameter is used.

Input

example set input

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.

Output

example set output

The infinite values are replaced by the specified replacement and the resultant ExampleSet is output of this port.

original

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.

preprocessing model

This port delivers the preprocessing model, which has information regarding the parameters of this operator in the current process.

Parameters

Create view

It is possible to create a View instead of changing the underlying data. Simply select this parameter to enable this option. The transformation that would be normally performed directly on the data will then be computed every time a value is requested and the result is returned without changing the data.

Attribute filter type

This parameter allows you to select the attribute selection filter; the method you want to use for selecting attributes in which you want to replace infinite values. It has the following options:

  • all: This option simply selects all the attributes of the ExampleSet. This is the default option.
  • single: This option allows selection of a single attribute. When this option is selected another parameter (attribute) becomes visible in Parameters panel.
  • subset: This option allows selection of multiple attributes through a list. All attributes of ExampleSet are present in the list; required attributes can be easily selected. This option will not work if meta data is not known. When this option is selected another parameter becomes visible in Parameters panel.
  • regular_expression: This option allows you to specify a regular expression for attribute selection. When this option is selected some other parameters (regular expression, use except expression) become visible in Parameters panel.
  • value_type: This option allows selection of all the attributes of a particular type. It should be noted that types are hierarchical. For examplerealandintegertypes both belong tonumerictype. User should have basic understanding of type hierarchy when selecting attributes through this option. When this option is selected some other parameters (value type, use value type exception) become visible in Parameters panel.
  • block_type: This option is similar in working tovalue_typeoption. This option allows selection of all the attributes of a particular block type. It should be noted that block types may be hierarchical. For examplevalue_series_startandvalue_series_endblock types both belong tovalue_seriesblock type. When this option is selected some other parameters (block type, use block type exception) become visible in Parameters panel.
  • no_missing_values: This option simply selects all the attributes of the ExampleSet which don't contain a missing value in any example. Attributes that have even a single missing value are not selected.
  • numeric_value_filter: When this option is selected another parameter (numeric condition) becomes visible in Parameters panel. All numeric attributes whose all examples satisfy the mentioned numeric condition are selected. Please note that all nominal attributes are also selected irrespective of the given numerical condition.

Attribute

The required attribute can be selected from this option. The attribute name can be selected from the drop down box of theparameterattribute if the meta data is known.

Attributes

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 and can be shifted to the right list which is the list of selected attributes.

Regular expression

Attributes whose name match this expression will be selected. Regular expression is a very powerful tool but needs a detailed explanation to beginners. It is always good to specify the regular expression throughedit and preview regular expressionmenu. This menu gives a good idea of regular expressions. It also allows you to try different expressions and preview the results simultaneously. This will enhance your concept of regular expressions.

Use except expression

如果启用,异常第一个正则expression can be specified. When this option is selected another parameter (except regular expression) becomes visible in Parameters panel.

Except regular 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 inregular expressionparameter).

Value type

Type of attributes to be selected can be chosen from drop down list.

Use value type exception

If enabled, an exception to the selected type can be specified. When this option is selected another parameter (except value type) becomes visible in Parameters panel.

Except value type

Attributes matching this type will be removed from the final output even if they matched the previously mentioned type i.e.value typeparameter's value.

Block type

Block type of attributes to be selected can be chosen from drop down list.

Use block type exception

If enabled, an exception to the selected block type can be specified. When this option is selected another parameter (except block type) becomes visible in Parameters panel.

Except block type

Attributes matching this block type will be removed from the final output even if they matched the previously mentioned block type.

Numeric condition

Numeric condition for testing examples of numeric attributes is mention here. For example the numeric condition '>6' will keep all nominal attributes and all numeric attributes having a value of greater than 6 in every example. A combination of conditions is possible: '>6 &&<11' or '<= 5 ||<0'. But && and || cannot be used together in one numeric condition. Conditions like '(>0 &&<2) || (>10 &&<12)' are not allowed because they use both && and ||. Use a blank space after '>', '=' and '<' e.g. '<5' will not work, so use '<5' instead.

Invert selection

If this parameter is set to true, it acts as a NOT gate, it reverses the selection. In that case all the selected attributes are unselected and previously unselected attributes are selected. For example if attribute 'att1' is selected and attribute 'att2' is removed prior to selection of this parameter. After selection of this parameter 'att1' will be removed and 'att2' will be selected.

Include special attributes

Special attributes are attributes with special roles which identify the examples. In contrast regular attributes simply describe the examples. Special attributes are: id, label, prediction, cluster, weight and batch. By default all special attributes are delivered to the output port irrespective of the conditions in the Select Attribute operator. If this parameter is set to true, Special attributes are also tested against conditions specified in the Select Attribute operator and only those attributes are selected that satisfy the conditions.

Default

This parameter specifies the replacement to apply to all attributes that are not explicitly specified by thecolumnsparameter. The following options are available: none, zero, max_byte, max_int, max_double, missing, value.

Columns

Different attributes can be provided with different types of replacements through this parameter. The default replacement selected by thedefaultparameter is applied on attributes that are not explicitly mentioned in thecolumnsparameter

Replenish what

This parameter specifies if positive or negative infinity values should be replaced.

Replenishment value

This parameter is only available when thedefaultparameter is set to 'value'. This value will be inserted instead of infinity.