com.rapidminer.operator.meta
Class AbstractSplitChain

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.OperatorChain
          extended by com.rapidminer.operator.meta.AbstractSplitChain
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ParameterHandler, LoggingHandler
Direct Known Subclasses:
AbsoluteSplitChain, RatioSplitChain

public abstract class AbstractSplitChain
extends OperatorChain

An operator chain that split an ExampleSet into two disjunct parts and applies the first child operator on the first part and applies the second child on the second part and the result of the first child. The total result is the result of the second operator.

Subclasses must define how the example set is divided.

Author:
Ingo Mierswa

Constructor Summary
AbstractSplitChain(OperatorDescription description)
           
 
Method Summary
 IOObject[] apply()
          Applies all inner operators.
protected abstract  SplittedExampleSet createSplittedExampleSet(ExampleSet exampleSet)
          Creates the splitted example for this operator.
 InnerOperatorCondition getInnerOperatorCondition()
          Must return a condition of the IO behaviour of all desired inner operators.
 java.lang.Class<?>[] getInputClasses()
          Returns the the classes this operator expects as input.
 InputDescription getInputDescription(java.lang.Class cls)
          The default implementation returns an input description that consumes the input IOObject without a user parameter.
 int getMaxNumberOfInnerOperators()
          Returns the maximum number of inner operators.
 int getMinNumberOfInnerOperators()
          Returns the minimum number of inner operators.
 java.lang.Class<?>[] getOutputClasses()
          Returns the the classes this operator provides as output.
 
Methods inherited from class com.rapidminer.operator.OperatorChain
addAddListener, addOperator, addOperator, checkDeprecations, checkIO, checkNumberOfInnerOperators, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createProcessTree, getAllInnerOperators, getIndexOfOperator, getInnerOperatorForName, getInnerOperatorsXML, getNumberOfAllOperators, getNumberOfOperators, getOperator, getOperatorFromAll, getOperators, performAdditionalChecks, processFinished, processStarts, registerOperator, removeAddListener, removeOperator, shouldAddNonConsumedInput, shouldReturnInnerOutput, unregisterOperator
 
Methods inherited from class com.rapidminer.operator.Operator
addError, addValue, addWarning, apply, checkForStop, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, getInput, getInput, getInput, getIOContainerForInApplyLoopBreakpoint, getIODescription, getLog, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsString, getParameterList, getParameters, getParameterType, getParameterTypes, getParent, getProcess, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isEnabled, isExpanded, isParallel, isParameterSet, log, logError, logNote, logWarning, register, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSplitChain

public AbstractSplitChain(OperatorDescription description)
Method Detail

createSplittedExampleSet

protected abstract SplittedExampleSet createSplittedExampleSet(ExampleSet exampleSet)
                                                        throws OperatorException
Creates the splitted example for this operator. Please note that the results must contain two parts.

Throws:
OperatorException

apply

public IOObject[] apply()
                 throws OperatorException
Description copied from class: OperatorChain
Applies all inner operators. The input to this operator becomes the input of the first inner operator. The latter's output is passed to the second inner operator and so on. Note to subclassers: If subclasses (for example wrappers) want to make use of this method remember to call exactly this method (super.apply()) and do not call super.apply(IOContainer) erroneously which will result in an infinite loop.

Overrides:
apply in class OperatorChain
Returns:
the last inner operator's output or the input itself if the chain is empty.
Throws:
OperatorException

getInnerOperatorCondition

public InnerOperatorCondition getInnerOperatorCondition()
Description copied from class: OperatorChain
Must return a condition of the IO behaviour of all desired inner operators. If there are no "special" conditions and the chain works similar to a simple operator chain this method should at least return a SimpleChainInnerOperatorCondition. More than one condition should be combined with help of the class CombinedInnerOperatorCondition.

Specified by:
getInnerOperatorCondition in class OperatorChain

getInputDescription

public InputDescription getInputDescription(java.lang.Class cls)
Description copied from class: Operator
The default implementation returns an input description that consumes the input IOObject without a user parameter. Subclasses may override this method to allow other input handling behaviors.

Overrides:
getInputDescription in class Operator

getMaxNumberOfInnerOperators

public int getMaxNumberOfInnerOperators()
Returns the maximum number of inner operators.

Specified by:
getMaxNumberOfInnerOperators in class OperatorChain

getMinNumberOfInnerOperators

public int getMinNumberOfInnerOperators()
Returns the minimum number of inner operators.

Specified by:
getMinNumberOfInnerOperators in class OperatorChain

getInputClasses

public java.lang.Class<?>[] getInputClasses()
Returns the the classes this operator expects as input.

Specified by:
getInputClasses in class Operator

getOutputClasses

public java.lang.Class<?>[] getOutputClasses()
Returns the the classes this operator provides as output.

Specified by:
getOutputClasses in class Operator


Copyright © 2001-2009 by Rapid-I