com.rapidminer.operator.preprocessing.filter
Class NumericToBinominal

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Operator>
      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.AbstractFilteredDataProcessing
                      extended by com.rapidminer.operator.preprocessing.filter.NumericToNominal
                          extended by com.rapidminer.operator.preprocessing.filter.NumericToBinominal
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>

public class NumericToBinominal
extends NumericToNominal

Converts all numerical attributes to binary ones. If the value of an attribute is between the specified minimal and maximal value, it becomes false, otherwise true. If the value is missing, the new value will be missing. The default boundaries are both set to 0, thus only 0.0 is mapped to false and all other values are mapped to true.

Author:
Sebastian Land, Ingo Mierswa, Shevek, Tobias Malbrecht

Field Summary
static java.lang.String PARAMETER_MAX
          The parameter name for "The maximal value which is mapped to false (included).
static java.lang.String PARAMETER_MIN
          The parameter name for "The minimal value which is mapped to false (included).
 
Constructor Summary
NumericToBinominal(OperatorDescription description)
           
 
Method Summary
 ExampleSetMetaData applyOnFilteredMetaData(ExampleSetMetaData emd)
          This method has to be implemented in order to specify the changes of the meta data caused by the application of this operator.
protected  int getGeneratedAttributevalueType()
          Returns Ontology.NOMINAL or one of its subtypes.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 ResourceConsumptionEstimator getResourceConsumptionEstimator()
          Subclasses can override this method if they are able to estimate the consumed resources (CPU time and memory), based on their input.
protected  Attribute makeAttribute()
           
protected  void setValue(Example example, Attribute newAttribute, double value)
           
 
Methods inherited from class com.rapidminer.operator.preprocessing.filter.NumericToNominal
applyOnFiltered, cleanUp, getFilterValueTypes, init, writesIntoExistingData
 
Methods inherited from class com.rapidminer.operator.preprocessing.filter.AbstractFilteredDataProcessing
apply, modifyMetaData
 
Methods inherited from class com.rapidminer.operator.AbstractExampleSetProcessing
doWork, getExampleSetInputPort, getExampleSetOutputPort, getInputPort, getRequiredMetaData, shouldAutoConnect
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, assumePreconditionsSatisfied, checkAll, checkAllExcludingMetaData, checkDeprecations, checkForStop, checkIO, checkProperties, clear, clearErrorList, cloneOperator, collectErrors, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, freeMemory, getAddOnlyAdditionalOutput, getApplyCount, getCompatibilityLevel, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getDOMRepresentation, getEncoding, getErrorList, getExecutionUnit, getExperiment, getIncompatibleVersionChanges, getInput, getInput, getInput, getInputClasses, getInputDescription, getInputPorts, getIODescription, getLog, getLogger, getName, getNumberOfBreakpoints, getOperatorClassName, getOperatorDescription, getOutputClasses, getOutputPorts, getParameter, getParameterAsBoolean, getParameterAsChar, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsRepositoryLocation, getParameterAsString, getParameterHandler, getParameterList, getParameters, getParameterTupel, getParameterType, getParent, getPortOwner, getProcess, getRoot, getStartTime, getTransformer, getUserDescription, getValue, getValues, getXML, getXML, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isDirty, isEnabled, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, lookupOperator, makeDirty, makeDirtyOnUpdate, notifyRenaming, performAdditionalChecks, preAutoWire, processFinished, processStarts, producesOutput, propagateDirtyness, register, registerOperator, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, unregisterOperator, updateExecutionOrder, walk, writeXML, writeXML
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMETER_MIN

public static final java.lang.String PARAMETER_MIN
The parameter name for "The minimal value which is mapped to false (included)."

See Also:
Constant Field Values

PARAMETER_MAX

public static final java.lang.String PARAMETER_MAX
The parameter name for "The maximal value which is mapped to false (included)."

See Also:
Constant Field Values
Constructor Detail

NumericToBinominal

public NumericToBinominal(OperatorDescription description)
Method Detail

applyOnFilteredMetaData

public ExampleSetMetaData applyOnFilteredMetaData(ExampleSetMetaData emd)
                                           throws UndefinedParameterError
Description copied from class: AbstractFilteredDataProcessing
This method has to be implemented in order to specify the changes of the meta data caused by the application of this operator.

Overrides:
applyOnFilteredMetaData in class NumericToNominal
Throws:
UndefinedParameterError

setValue

protected void setValue(Example example,
                        Attribute newAttribute,
                        double value)
                 throws OperatorException
Specified by:
setValue in class NumericToNominal
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. ATTENTION! This will create new parameterTypes. For calling already existing parameter types use getParameters().getParameterTypes();

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

getGeneratedAttributevalueType

protected int getGeneratedAttributevalueType()
Description copied from class: NumericToNominal
Returns Ontology.NOMINAL or one of its subtypes.

Specified by:
getGeneratedAttributevalueType in class NumericToNominal

makeAttribute

protected Attribute makeAttribute()
Overrides:
makeAttribute in class NumericToNominal

getResourceConsumptionEstimator

public ResourceConsumptionEstimator getResourceConsumptionEstimator()
Description copied from class: Operator
Subclasses can override this method if they are able to estimate the consumed resources (CPU time and memory), based on their input. The default implementation returns null.

Specified by:
getResourceConsumptionEstimator in interface ResourceConsumer
Overrides:
getResourceConsumptionEstimator in class Operator


Copyright © 2001-2009 by Rapid-I