com.rapidminer.operator.preprocessing.filter.attributes
Interface AttributeFilterCondition

All Known Implementing Classes:
AbstractAttributeFilterCondition, DateAttributeFilter, MissingValuesAttributeFilter, NameAttributeFilter, NominalAttributeFilter, NoMissingValuesAttributeFilter, NumericalAttributeFilter, NumericValueAttributeFilter

public interface AttributeFilterCondition

This interface must be implemented by classes implementing an AttributeFilterCondition for the AttributeFilter operator.

Author:
Sebastian Land, Ingo Mierswa

Nested Class Summary
static class AttributeFilterCondition.ScanResult
           
 
Method Summary
 AttributeFilterCondition.ScanResult beforeScanCheck(Attribute attribute)
          This method initializes this condition and resets all counters.
 AttributeFilterCondition.ScanResult check(Attribute attribute, Example example)
          This method checks the given example.
 AttributeFilterCondition.ScanResult checkAfterFullScan()
          This method has to be invoked after a full scan has been performed if the isNeedingFullScan method returns true.
 java.util.List<ParameterType> getParameterTypes(Operator operator)
          This method returns the parameter types used by this filter condition
 void init(Operator operator)
          Initializes the condition before checking anything.
 boolean isNeedingFullScan()
          Indicates that this filter needs a full data scan and can evaluate its condition only after the full scan has been performed.
 boolean isNeedingScan()
          Indicates if this filter needs a data scan, i.e. an invocation of the check method for each example.
 

Method Detail

beforeScanCheck

AttributeFilterCondition.ScanResult beforeScanCheck(Attribute attribute)
                                                    throws UserError
This method initializes this condition and resets all counters. It returns REMOVE, if the attribute can be removed without checking examples. If it has been removed, no checking during examples will occur. If it returns UNCHECKED, this Attribute Filter needs a full check and hence the attribute cannot be deleted or kept. Distinguishing this is important, because of the inverting, which otherwise might remove attributes although they only have been kept for later checking.

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

isNeedingScan

boolean isNeedingScan()
Indicates if this filter needs a data scan, i.e. an invocation of the check method for each example.


init

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

Throws:
UserError

check

AttributeFilterCondition.ScanResult check(Attribute attribute,
                                          Example example)
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.


isNeedingFullScan

boolean isNeedingFullScan()
Indicates that this filter needs a full data scan and can evaluate its condition only after the full scan has been performed. If this method returns true, isNeedingScan must have returned true either.


checkAfterFullScan

AttributeFilterCondition.ScanResult checkAfterFullScan()
This method has to be invoked after a full scan has been performed if the isNeedingFullScan method returns true.

Returns:
This method has to be restricted to return KEEP or REMOVED, but not unchecked

getParameterTypes

java.util.List<ParameterType> getParameterTypes(Operator operator)
This method returns the parameter types used by this filter condition

Parameters:
operator -


Copyright © 2001-2009 by Rapid-I