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

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

public class BlockTypeAttributeFilter
extends AbstractAttributeFilterCondition

This condition filters out all attributes whose block type does not match the one given in the parameter block_type. This can be useful e.g. for preprocessing operators that can handle only series attributes. Features of the type mentioned in except_block_type are removed even if they match block_type.

Author:
Sebastian Land

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.rapidminer.operator.preprocessing.filter.attributes.AttributeFilterCondition
AttributeFilterCondition.ScanResult
 
Field Summary
static java.lang.String PARAMETER_ADD_EXCEPTION
           
static java.lang.String PARAMETER_BLOCK_TYPE
           
static java.lang.String PARAMETER_EXCEPT_BLOCK_TYPE
           
 
Constructor Summary
BlockTypeAttributeFilter()
           
 
Method Summary
 AttributeFilterCondition.ScanResult beforeScanCheck(Attribute attribute)
          This method initializes this condition and resets all counters.
 java.util.List<ParameterType> getParameterTypes(ParameterHandler operator, InputPort inPort, int... valueTypes)
          Just returns an empty list.
 void init(ParameterHandler operator)
          Initializes the condition before checking anything.
 MetaDataInfo isFilteredOutMetaData(AttributeMetaData attribute, ParameterHandler handler)
          This method tries to check if the given attribute is contained, removed from the resulting operation or if the result is unpredictable.
 
Methods inherited from class com.rapidminer.operator.preprocessing.filter.attributes.AbstractAttributeFilterCondition
check, checkAfterFullScan, isNeedingFullScan, isNeedingScan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_BLOCK_TYPE

public static final java.lang.String PARAMETER_BLOCK_TYPE
See Also:
Constant Field Values

PARAMETER_ADD_EXCEPTION

public static final java.lang.String PARAMETER_ADD_EXCEPTION
See Also:
Constant Field Values

PARAMETER_EXCEPT_BLOCK_TYPE

public static final java.lang.String PARAMETER_EXCEPT_BLOCK_TYPE
See Also:
Constant Field Values
Constructor Detail

BlockTypeAttributeFilter

public BlockTypeAttributeFilter()
Method Detail

init

public void init(ParameterHandler operator)
          throws UserError,
                 ConditionCreationException
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
ConditionCreationException - TODO

isFilteredOutMetaData

public MetaDataInfo isFilteredOutMetaData(AttributeMetaData attribute,
                                          ParameterHandler handler)
                                   throws ConditionCreationException
Description copied from interface: AttributeFilterCondition
This method tries to check if the given attribute is contained, removed from the resulting operation or if the result is unpredictable.

Parameters:
attribute - the meta data of the attribute
handler - to get the value of the defined parameters
Returns:
Throws:
ConditionCreationException

beforeScanCheck

public AttributeFilterCondition.ScanResult beforeScanCheck(Attribute attribute)
                                                    throws UserError
Description copied from interface: AttributeFilterCondition
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:
UserError

getParameterTypes

public java.util.List<ParameterType> getParameterTypes(ParameterHandler operator,
                                                       InputPort inPort,
                                                       int... valueTypes)
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