com.rapidminer.operator.preprocessing.filter
Class FeatureNameFilter

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.AbstractExampleSetProcessing
          extended by com.rapidminer.operator.features.AbstractFeatureProcessing
              extended by com.rapidminer.operator.features.selection.AbstractFeatureSelection
                  extended by com.rapidminer.operator.preprocessing.filter.FeatureFilter
                      extended by com.rapidminer.operator.preprocessing.filter.FeatureNameFilter
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ParameterHandler, LoggingHandler

public class FeatureNameFilter
extends FeatureFilter

This operator switches off all features whose name matches the one given in the parameter skip_features_with_name. The name can be defined as a regular expression.

Author:
Buelent Moeller, Ingo Mierswa

Field Summary
static java.lang.String PARAMETER_EXCEPT_FEATURES_WITH_NAME
          The parameter name for "Does not remove attributes if their name fulfills this matching criterion (accepts regular expressions)"
static java.lang.String PARAMETER_SKIP_FEATURES_WITH_NAME
          The parameter name for "Remove attributes with a matching name (accepts regular expressions)"
 
Fields inherited from class com.rapidminer.operator.preprocessing.filter.FeatureFilter
PARAMETER_FILTER_SPECIAL_FEATURES
 
Constructor Summary
FeatureNameFilter(OperatorDescription description)
           
 
Method Summary
 ExampleSet apply(ExampleSet exampleSet)
          Applies filtering of features by looping through all features and checking switchOffFeature().
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 boolean switchOffFeature(AttributeRole attributeRole)
          Implements the method required by the superclass.
 
Methods inherited from class com.rapidminer.operator.AbstractExampleSetProcessing
apply, getInputClasses, getOutputClasses
 
Methods inherited from class com.rapidminer.operator.Operator
addError, addValue, addWarning, apply, checkDeprecations, checkForStop, checkIO, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, getInnerOperatorsXML, getInput, getInput, getInput, getInputDescription, getIOContainerForInApplyLoopBreakpoint, getIODescription, getLog, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsString, getParameterList, getParameters, getParameterType, getParent, getProcess, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isEnabled, isExpanded, isParallel, isParameterSet, log, logError, logNote, logWarning, performAdditionalChecks, processFinished, processStarts, register, registerOperator, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, unregisterOperator, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMETER_SKIP_FEATURES_WITH_NAME

public static final java.lang.String PARAMETER_SKIP_FEATURES_WITH_NAME
The parameter name for "Remove attributes with a matching name (accepts regular expressions)"

See Also:
Constant Field Values

PARAMETER_EXCEPT_FEATURES_WITH_NAME

public static final java.lang.String PARAMETER_EXCEPT_FEATURES_WITH_NAME
The parameter name for "Does not remove attributes if their name fulfills this matching criterion (accepts regular expressions)"

See Also:
Constant Field Values
Constructor Detail

FeatureNameFilter

public FeatureNameFilter(OperatorDescription description)
Method Detail

apply

public ExampleSet apply(ExampleSet exampleSet)
                 throws OperatorException
Description copied from class: FeatureFilter
Applies filtering of features by looping through all features and checking switchOffFeature(). If TRUE is returned, the feature is switched off, ie it won't be used by the following operators in the chain. If FALSE is returned by switchOffFeature(), the feature will keep its previous status.

Overrides:
apply in class FeatureFilter
Returns:
An array of IOObjects, with the output example set as the only member.
Throws:
OperatorException

switchOffFeature

public boolean switchOffFeature(AttributeRole attributeRole)
                         throws OperatorException
Implements the method required by the superclass. For features whose name matches the input name (regular expression). If the input name does not match the the input name (regular expression) will not be switched off. If no parameter was provided, FALSE is always returned, so no feature is switched off.

Specified by:
switchOffFeature in class FeatureFilter
Parameters:
attributeRole - Feature to check.
Returns:
TRUE if this feature should not be active in the output example set of this operator. FALSE otherwise.
Throws:
OperatorException

getParameterTypes

public java.util.List<ParameterType> getParameterTypes()
Description copied from class: Operator
Returns a list of ParameterTypes describing the parameters of this operator. The default implementation returns an empty list if no input objects can be retained and special parameters for those input objects which can be prevented from being consumed.

Specified by:
getParameterTypes in interface ParameterHandler
Overrides:
getParameterTypes in class FeatureFilter


Copyright © 2001-2009 by Rapid-I