com.rapidminer.operator.preprocessing.discretization
Class UserBasedDiscretization
java.lang.Object
com.rapidminer.tools.AbstractObservable<Operator>
com.rapidminer.operator.Operator
com.rapidminer.operator.AbstractExampleSetProcessing
com.rapidminer.operator.preprocessing.AbstractDataProcessing
com.rapidminer.operator.preprocessing.PreprocessingOperator
com.rapidminer.operator.preprocessing.discretization.AbstractDiscretizationOperator
com.rapidminer.operator.preprocessing.discretization.UserBasedDiscretization
- All Implemented Interfaces:
- ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>
public class UserBasedDiscretization
- extends AbstractDiscretizationOperator
This operator discretizes a numerical attribute to either a nominal or an ordinal attribute. The numerical values are mapped to the classes according to the thresholds specified by the user. The user can define the classes by specifying the upper
limits of each class. The lower limit of the next class is automatically specified as the upper limit of the previous one. A parameter defines to which adjacent class values that are equal to the given limits should be mapped. If the upper limit
in the last list entry is not equal to Infinity, an additional class which is automatically named is added. If a '?' is given as class value the according numerical values are mapped to unknown values in the resulting attribute.
- Author:
- Sebastian Land
Methods inherited from class com.rapidminer.operator.preprocessing.PreprocessingOperator |
apply, checkSelectedSubsetMetaData, doWork, doWorkModel, getPreprocessingModelOutputPort, getSelectedAttributes, isSupportingAttributeRoles, isSupportingView, modifyMetaData, shouldAutoConnect, writesIntoExistingData |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PARAMETER_ATTRIBUTE_TYPE
public static final java.lang.String PARAMETER_ATTRIBUTE_TYPE
- The parameter name for "Attribute type of the discretized attribute."
- See Also:
- Constant Field Values
PARAMETER_UPPER_LIMIT
public static final java.lang.String PARAMETER_UPPER_LIMIT
- The parameter name for the upper limit.
- See Also:
- Constant Field Values
PARAMETER_RANGE_NAMES
public static final java.lang.String PARAMETER_RANGE_NAMES
- The parameter name for "Defines the classes and the upper limits of each class."
- See Also:
- Constant Field Values
attributeTypeStrings
public static final java.lang.String[] attributeTypeStrings
ATTRIBUTE_TYPE_NOMINAL
public static final int ATTRIBUTE_TYPE_NOMINAL
- See Also:
- Constant Field Values
ATTRIBUTE_TYPE_ORDINAL
public static final int ATTRIBUTE_TYPE_ORDINAL
- See Also:
- Constant Field Values
UserBasedDiscretization
public UserBasedDiscretization(OperatorDescription description)
modifyAttributeMetaData
protected java.util.Collection<AttributeMetaData> modifyAttributeMetaData(ExampleSetMetaData emd,
AttributeMetaData amd)
throws UndefinedParameterError
- Description copied from class:
PreprocessingOperator
- If this preprocessing operator generates new attributes, the corresponding meta data should be
returned by this method. The attribute will be replaced by the collection.
If this operator modifies a single one, amd itself should be modified as a side effect
and null should be returned. Note: If an empty collection is returned, amd will be removed,
but no new attribute will be added.
- Overrides:
modifyAttributeMetaData
in class AbstractDiscretizationOperator
- Throws:
UndefinedParameterError
createPreprocessingModel
public PreprocessingModel createPreprocessingModel(ExampleSet exampleSet)
throws OperatorException
- Specified by:
createPreprocessingModel
in class PreprocessingOperator
- Throws:
OperatorException
getPreprocessingModelClass
public java.lang.Class<? extends PreprocessingModel> getPreprocessingModelClass()
- Specified by:
getPreprocessingModelClass
in class PreprocessingOperator
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 PreprocessingOperator
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