com.rapidminer.operator.meta
Class XVPrediction

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.OperatorChain
          extended by com.rapidminer.operator.meta.XVPrediction
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ParameterHandler, LoggingHandler

public class XVPrediction
extends OperatorChain

Operator chain that splits an ExampleSet into a training and test sets similar to XValidation, but returns the test set predictions instead of a performance vector. The inner two operators must be a learner returning a Model and an operator or operator chain that can apply this model (usually a model applier)

Author:
Stefan Rueping, Ingo Mierswa, Sebastian Land

Field Summary
static java.lang.String PARAMETER_LEAVE_ONE_OUT
          The parameter name for "Set the number of validations to the number of examples.
static java.lang.String PARAMETER_LOCAL_RANDOM_SEED
          The parameter name for "Use the given random seed instead of global random numbers (-1: use global).
static java.lang.String PARAMETER_NUMBER_OF_VALIDATIONS
          The parameter name for "Number of subsets for the crossvalidation.
static java.lang.String PARAMETER_SAMPLING_TYPE
          The parameter name for "Defines the sampling type of the cross validation.
 
Constructor Summary
XVPrediction(OperatorDescription description)
           
 
Method Summary
 IOObject[] apply()
          Applies all inner operators.
 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 provides as output.
 int getMaxNumberOfInnerOperators()
          Returns the maximum number of innner operators.
 int getMinNumberOfInnerOperators()
          Returns the minimum number of innner operators.
 java.lang.Class<?>[] getOutputClasses()
          returns the the classes this operator expects as input.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 
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, 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, 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
 

Field Detail

PARAMETER_NUMBER_OF_VALIDATIONS

public static final java.lang.String PARAMETER_NUMBER_OF_VALIDATIONS
The parameter name for "Number of subsets for the crossvalidation."

See Also:
Constant Field Values

PARAMETER_LEAVE_ONE_OUT

public static final java.lang.String PARAMETER_LEAVE_ONE_OUT
The parameter name for "Set the number of validations to the number of examples. If set to true, number_of_validations is ignored."

See Also:
Constant Field Values

PARAMETER_SAMPLING_TYPE

public static final java.lang.String PARAMETER_SAMPLING_TYPE
The parameter name for "Defines the sampling type of the cross validation."

See Also:
Constant Field Values

PARAMETER_LOCAL_RANDOM_SEED

public static final java.lang.String PARAMETER_LOCAL_RANDOM_SEED
The parameter name for "Use the given random seed instead of global random numbers (-1: use global)."

See Also:
Constant Field Values
Constructor Detail

XVPrediction

public XVPrediction(OperatorDescription description)
Method Detail

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

getMaxNumberOfInnerOperators

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

Specified by:
getMaxNumberOfInnerOperators in class OperatorChain

getMinNumberOfInnerOperators

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

Specified by:
getMinNumberOfInnerOperators in class OperatorChain

getInputClasses

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

Specified by:
getInputClasses in class Operator

getOutputClasses

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

Specified by:
getOutputClasses in class Operator

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

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