com.rapidminer.operator.preprocessing.filter
Class ValueReplenishment

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.AbstractExampleSetProcessing
          extended by com.rapidminer.operator.preprocessing.AbstractDataProcessing
              extended by com.rapidminer.operator.preprocessing.filter.ValueReplenishment
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ParameterHandler, LoggingHandler
Direct Known Subclasses:
InfiniteValueReplenishment, MissingValueReplenishment

public abstract class ValueReplenishment
extends AbstractDataProcessing

Abstract superclass for all operators that replenish values, e.g. nan or infinite values.

Author:
Ingo Mierswa, Simon Fischer

Field Summary
static java.lang.String PARAMETER_COLUMNS
          The parameter name for "List of replacement functions for each column.
static java.lang.String PARAMETER_DEFAULT
          The parameter name for "Function to apply to all columns that are not explicitly specified by parameter 'columns'.
static java.lang.String PARAMETER_REPLENISHMENT_VALUE
          The parameter name for "This value is used for some of the replenishment types.
 
Constructor Summary
ValueReplenishment(OperatorDescription description)
           
 
Method Summary
 ExampleSet apply(ExampleSet eSet)
          Iterates over all examples and all attributes makes callbacks to getReplenishmentValue(int, ExampleSet, Attribute, double, String) if replenishValue(double) returns true.
abstract  int getDefaultColumnFunction()
          Returns the index of the replenishment function which will be used for attributes listed in the parameter list "columns".
abstract  int getDefaultFunction()
          Returns the index of the replenishment function which will be used for attributes not listed in the parameter list "columns".
abstract  java.lang.String[] getFunctionNames()
          Returns an array of all replenishment functions.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
abstract  double getReplenishmentValue(int functionIndex, ExampleSet baseExampleSet, Attribute attribute, double currentValue, java.lang.String valueString)
          Returns the value of the replenishment function with the given index.
abstract  boolean replenishValue(double currentValue)
          Returns true iff the value should be replenished.
 
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_DEFAULT

public static final java.lang.String PARAMETER_DEFAULT
The parameter name for "Function to apply to all columns that are not explicitly specified by parameter 'columns'."

See Also:
Constant Field Values

PARAMETER_COLUMNS

public static final java.lang.String PARAMETER_COLUMNS
The parameter name for "List of replacement functions for each column."

See Also:
Constant Field Values

PARAMETER_REPLENISHMENT_VALUE

public static final java.lang.String PARAMETER_REPLENISHMENT_VALUE
The parameter name for "This value is used for some of the replenishment types."

See Also:
Constant Field Values
Constructor Detail

ValueReplenishment

public ValueReplenishment(OperatorDescription description)
Method Detail

replenishValue

public abstract boolean replenishValue(double currentValue)
Returns true iff the value should be replenished.


getReplenishmentValue

public abstract double getReplenishmentValue(int functionIndex,
                                             ExampleSet baseExampleSet,
                                             Attribute attribute,
                                             double currentValue,
                                             java.lang.String valueString)
Returns the value of the replenishment function with the given index.


getFunctionNames

public abstract java.lang.String[] getFunctionNames()
Returns an array of all replenishment functions.


getDefaultFunction

public abstract int getDefaultFunction()
Returns the index of the replenishment function which will be used for attributes not listed in the parameter list "columns".


getDefaultColumnFunction

public abstract int getDefaultColumnFunction()
Returns the index of the replenishment function which will be used for attributes listed in the parameter list "columns".


apply

public ExampleSet apply(ExampleSet eSet)
                 throws OperatorException
Iterates over all examples and all attributes makes callbacks to getReplenishmentValue(int, ExampleSet, Attribute, double, String) if replenishValue(double) returns true.

Specified by:
apply in class AbstractExampleSetProcessing
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 Operator


Copyright © 2001-2009 by Rapid-I