com.rapidminer.operator.preprocessing.filter.attributes
Class NumericValueAttributeFilter

java.lang.Object
  extended by com.rapidminer.operator.preprocessing.filter.attributes.AbstractAttributeFilterCondition
      extended by com.rapidminer.operator.preprocessing.filter.attributes.NumericValueAttributeFilter
All Implemented Interfaces:
AttributeFilterCondition

public class NumericValueAttributeFilter
extends AbstractAttributeFilterCondition

This class implements a condition for the AttributeFilter operator. It provides the possibility to check if all values of a numerical attribute match a condition. This conditions might be specified by != or <>, =, <, <=, >, >= followed by a value. For example like this: "> 6.5" would keep all attributes having only values greater 6.5. This single conditions might be combined by || or && but not mixed. Example: "> 6.5 && < 11" would keep all attributes containing only values between 6.5 and 11.

Author:
Sebastian Land, Ingo Mierswa

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.rapidminer.operator.preprocessing.filter.attributes.AttributeFilterCondition
AttributeFilterCondition.ScanResult
 
Constructor Summary
NumericValueAttributeFilter()
           
 
Method Summary
 AttributeFilterCondition.ScanResult beforeScanCheck(Attribute attribute)
          Don't remove any attribute without checking values
 AttributeFilterCondition.ScanResult check(Attribute attribute, Example example)
          This method checks the given example.
 java.util.List<ParameterType> getParameterTypes(Operator operator)
          Just returns an empty list.
 void init(Operator operator)
          Initializes the condition before checking anything.
 boolean isNeedingScan()
          Indicates if this filter needs a data scan, i.e. an invocation of the check method for each example.
 
Methods inherited from class com.rapidminer.operator.preprocessing.filter.attributes.AbstractAttributeFilterCondition
checkAfterFullScan, isNeedingFullScan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericValueAttributeFilter

public NumericValueAttributeFilter()
Method Detail

beforeScanCheck

public AttributeFilterCondition.ScanResult beforeScanCheck(Attribute attribute)
                                                    throws UserError
Don't remove any attribute without checking values

Parameters:
attribute - this is the attribute, the filter will have to check for.
Throws:
UserError

init

public void init(Operator operator)
          throws UserError
Description copied from interface: AttributeFilterCondition
Initializes the condition before checking anything. If checking depends on parameters, their values might be retrieved in this method.

Specified by:
init in interface AttributeFilterCondition
Overrides:
init in class AbstractAttributeFilterCondition
Throws:
UserError

check

public AttributeFilterCondition.ScanResult check(Attribute attribute,
                                                 Example example)
Description copied from interface: AttributeFilterCondition
This method checks the given example. During this method the filter might check data to decide if attribute should be filtered out. If the condition needs a full scan before it can decide, this result is ignored.

Specified by:
check in interface AttributeFilterCondition
Overrides:
check in class AbstractAttributeFilterCondition

isNeedingScan

public boolean isNeedingScan()
Description copied from interface: AttributeFilterCondition
Indicates if this filter needs a data scan, i.e. an invocation of the check method for each example.

Specified by:
isNeedingScan in interface AttributeFilterCondition
Overrides:
isNeedingScan in class AbstractAttributeFilterCondition

getParameterTypes

public java.util.List<ParameterType> getParameterTypes(Operator operator)
Description copied from class: AbstractAttributeFilterCondition
Just returns an empty list. Subclasses might add parameters

Specified by:
getParameterTypes in interface AttributeFilterCondition
Overrides:
getParameterTypes in class AbstractAttributeFilterCondition


Copyright © 2001-2009 by Rapid-I