com.rapidminer.operator.validation
Class SlidingWindowValidation

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

public class SlidingWindowValidation
extends ValidationChain

This is a special validation chain which can only be used for series predictions where the time points are encoded as examples. It uses a certain window of examples for training and uses another window (after horizon examples, i.e. time points) for testing. The window is moved across the example set and all performance measurements are averaged afterwards. The parameter "cumulative_training" indicates if all former examples should be used for training (instead of only the current window).

This validation operator provides several values which can be logged by means of a ProcessLogOperator. All performance estimation operators of RapidMiner provide access to the average values calculated during the estimation. Since the operator cannot ensure the names of the delivered criteria, the ProcessLog operator can access the values via the generic value names:

Author:
Ingo Mierswa

Field Summary
static java.lang.String PARAMETER_AVERAGE_PERFORMANCES_ONLY
          The parameter name for "Indicates if only performance vectors should be averaged or all types of averagable result vectors"
static java.lang.String PARAMETER_CUMULATIVE_TRAINING
          The parameter name for "Indicates if each training window should be added to the old one or should replace the old one.
static java.lang.String PARAMETER_HORIZON
          The parameter name for "Number of examples which are between the training and testing examples"
static java.lang.String PARAMETER_TEST_WINDOW_WIDTH
          The parameter name for "Number of examples which are used for testing (following after 'horizon' examples after the training window end)"
static java.lang.String PARAMETER_TRAINING_WINDOW_STEP_SIZE
          The parameter name for "Number of examples the window is moved after each iteration (-1: same as test window width)"
static java.lang.String PARAMETER_TRAINING_WINDOW_WIDTH
          The parameter name for "Number of examples in the window which is used for training"
 
Fields inherited from class com.rapidminer.operator.validation.ValidationChain
PARAMETER_CREATE_COMPLETE_MODEL
 
Constructor Summary
SlidingWindowValidation(OperatorDescription description)
           
 
Method Summary
 IOObject[] estimatePerformance(ExampleSet inputSet)
          This is the main method of the validation chain and must be implemented to estimate a performance of inner operators on the given example set.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 
Methods inherited from class com.rapidminer.operator.validation.ValidationChain
apply, evaluate, evaluate, getInnerOperatorCondition, getInputClasses, getInputDescription, getLearner, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getOutputClasses, learn, setResult
 
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, 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_TRAINING_WINDOW_WIDTH

public static final java.lang.String PARAMETER_TRAINING_WINDOW_WIDTH
The parameter name for "Number of examples in the window which is used for training"

See Also:
Constant Field Values

PARAMETER_TRAINING_WINDOW_STEP_SIZE

public static final java.lang.String PARAMETER_TRAINING_WINDOW_STEP_SIZE
The parameter name for "Number of examples the window is moved after each iteration (-1: same as test window width)"

See Also:
Constant Field Values

PARAMETER_TEST_WINDOW_WIDTH

public static final java.lang.String PARAMETER_TEST_WINDOW_WIDTH
The parameter name for "Number of examples which are used for testing (following after 'horizon' examples after the training window end)"

See Also:
Constant Field Values

PARAMETER_HORIZON

public static final java.lang.String PARAMETER_HORIZON
The parameter name for "Number of examples which are between the training and testing examples"

See Also:
Constant Field Values

PARAMETER_CUMULATIVE_TRAINING

public static final java.lang.String PARAMETER_CUMULATIVE_TRAINING
The parameter name for "Indicates if each training window should be added to the old one or should replace the old one."

See Also:
Constant Field Values

PARAMETER_AVERAGE_PERFORMANCES_ONLY

public static final java.lang.String PARAMETER_AVERAGE_PERFORMANCES_ONLY
The parameter name for "Indicates if only performance vectors should be averaged or all types of averagable result vectors"

See Also:
Constant Field Values
Constructor Detail

SlidingWindowValidation

public SlidingWindowValidation(OperatorDescription description)
Method Detail

estimatePerformance

public IOObject[] estimatePerformance(ExampleSet inputSet)
                               throws OperatorException
Description copied from class: ValidationChain
This is the main method of the validation chain and must be implemented to estimate a performance of inner operators on the given example set. The implementation can make use of the provided helper methods in this class.

Specified by:
estimatePerformance in class ValidationChain
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 ValidationChain


Copyright © 2001-2009 by Rapid-I