com.rapidminer.operator.preprocessing.filter
Class AttributeValueSplit

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.AttributeValueSplit
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ParameterHandler, LoggingHandler

public class AttributeValueSplit
extends AbstractDataProcessing

This operator creates new attributes from a nominal attribute by dividing the nominal values into parts according to a split criterion (regular expression). This operator provides two different modes, depending on the setting of the parameter "splitting_mode".

Ordered Splits

In the first split mode, called ordered_split, the resulting attributes get the name of the original attribute together with a number indicating the order. For example, if the original data contained the values

attribute-name
--------------
value1
value2, value3
value3

and should be divided by the separating commas, the resulting attributes would be attribute-name1, attribute-name2, attribute-name3 with the tuples (value1, ?, ?), (value2, value3, ?), and (value3, ?, ?), respectively. This mode is useful if the original values indicated some order like, for example, a preference.

Unordered Splits

In the second split mode, called unordered_split, the resulting attributes get the name of the original attribute together with the value for each of the occurring values. For example, if the original data contained the values

attribute-name
--------------
value1
value2, value3
value3

and again should be divided by the separating commas, the resulting attributes would be attribute-name-value1, attribute-name-value2, and attribute-name-value3 with the tuples (true, false, false), (false, true, true), and (false, false, true), respectively. This mode is useful if the order is not important but the goal is a basket like data set containing all occurring values.

Author:
Ingo Mierswa

Field Summary
static java.lang.String PARAMETER_APPLY_TO_SPECIAL_FEATURES
           
static java.lang.String PARAMETER_ATTRIBUTES
           
static java.lang.String PARAMETER_SPLIT_MODE
           
static java.lang.String PARAMETER_SPLIT_PATTERN
           
static int SPLIT_MODE_ORDERED
           
static int SPLIT_MODE_UNORDERED
           
static java.lang.String[] SPLIT_MODES
           
 
Constructor Summary
AttributeValueSplit(OperatorDescription description)
           
 
Method Summary
 ExampleSet apply(ExampleSet exampleSet)
          Delegate for the apply method.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 
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_ATTRIBUTES

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

PARAMETER_APPLY_TO_SPECIAL_FEATURES

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

PARAMETER_SPLIT_PATTERN

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

PARAMETER_SPLIT_MODE

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

SPLIT_MODES

public static final java.lang.String[] SPLIT_MODES

SPLIT_MODE_ORDERED

public static final int SPLIT_MODE_ORDERED
See Also:
Constant Field Values

SPLIT_MODE_UNORDERED

public static final int SPLIT_MODE_UNORDERED
See Also:
Constant Field Values
Constructor Detail

AttributeValueSplit

public AttributeValueSplit(OperatorDescription description)
Method Detail

apply

public ExampleSet apply(ExampleSet exampleSet)
                 throws OperatorException
Description copied from class: AbstractExampleSetProcessing
Delegate for the apply method. In most cases, the returned example set will be the same as the example set or a modified clone.

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