Synopsis
This operator only allows examples which fulfill a specified condition.
Description
This operator takes an ExampleSet as input and returns a new ExampleSet including only the Examples that fulfill a condition.
By specifying an implementation of Condition and a parameter string, arbitrary filters can be applied. Users can implement their own conditions by writing a subclass of the above class and implementing a two argument constructor taking an ExampleSet and a parameter string. This parameter string is specified by the parameter parameter_string
. Instead of using one of the predefined conditions users can define their own implementation with the fully qualified class name.
For "attribute_value_condition" the parameter string must have the form attribute op value
, where attribute is a name of an attribute, value is a value the attribute can take and op is one of the binary logical operators similar to the ones known from Java, e.g. greater than or equals. Please note your can define a logical OR of several conditions with || and a logical AND of two conditions with two ampers and - or simply by applying several ExampleFilter operators in a row. Please note also that for nominal attributes you can define a regular expression for value of the possible equal and not equal checks.
For "unknown_attributes" the parameter string must be empty. This filter removes all examples containing attributes that have missing or illegal values. For "unknown_label" the parameter string must also be empty. This filter removes all examples with an unknown label value.
Input
- example set input: expects: ExampleSetMetaData: #examples: = 0; #attributes: 0
Output
- example set output:
- original:
Parameters
- condition class: Implementation of the condition.
- parameter string: Parameter string for the condition, e.g. 'attribute=value' for the AttributeValueFilter.
- invert filter: Indicates if only examples should be accepted which would normally filtered.