adams.flow.transformer
Class AbstractPHMMIterativeEvaluation<T extends IterativeHMMClassifier,E extends weka.utils.AbstractIterativeEvaluation>

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.core.AbstractActor
              extended by adams.flow.transformer.AbstractTransformer
                  extended by adams.flow.transformer.AbstractWekaClassifierEvaluator
                      extended by adams.flow.transformer.AbstractGlobalPHMMClassifierEvaluator<T>
                          extended by adams.flow.transformer.AbstractPHMMIterativeEvaluation<T,E>
All Implemented Interfaces:
AdditionalInformationHandler, CleanUpHandler, Debuggable, DebugOutputHandler, Destroyable, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractActor>, SizeOfHandler, Stoppable, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, ProvenanceSupporter, Serializable, Comparable
Direct Known Subclasses:
PHMMIterativeEvaluation

public abstract class AbstractPHMMIterativeEvaluation<T extends IterativeHMMClassifier,E extends weka.utils.AbstractIterativeEvaluation>
extends AbstractGlobalPHMMClassifierEvaluator<T>
implements ProvenanceSupporter

Ancestor for evaluators using IterativeEvaluation schemes.

Version:
$Revision: 5990 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  weka.utils.AbstractIterativeEvaluation.EvaluationStep m_CurrentStep
          the current evaluation step.
protected  int m_Folds
          the number of folds.
protected  int m_IterationStepSize
          the step size for the iterations.
protected  weka.utils.AbstractIterativeEvaluation.EvaluationIterator m_Iterator
          the evaluation iterator.
protected  int m_NumIterations
          the number of iterations to perform.
 
Fields inherited from class adams.flow.transformer.AbstractGlobalPHMMClassifierEvaluator
m_Classifier
 
Fields inherited from class adams.flow.transformer.AbstractWekaClassifierEvaluator
m_Output, m_OutputBuffer
 
Fields inherited from class adams.flow.transformer.AbstractTransformer
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken
 
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
 
Constructor Summary
AbstractPHMMIterativeEvaluation()
           
 
Method Summary
 Class[] accepts()
          Returns the class that the consumer accepts.
 String classifierTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  String doExecute()
          Executes the flow item.
 String foldsTipText()
          Returns the tip text for this property.
 int getFolds()
          Returns the number of folds.
 int getIterationStepSize()
          Returns the step size for the iterations.
 int getNumIterations()
          Returns the number of iterations to perform.
 String getQuickInfo()
          Returns a quick info about the actor, which will be displayed in the GUI.
 boolean hasPendingOutput()
          Checks whether there is pending output to be collected after executing the flow item.
 String iterationStepSizeTipText()
          Returns the tip text for this property.
protected abstract  E newEvaluation()
          Instantiates a new evaluation object.
 String numIterationsTipText()
          Returns the tip text for this property.
 Token output()
          Returns the generated token.
 void setFolds(int value)
          Sets the number of folds.
 void setIterationStepSize(int value)
          Sets the step size for the iterations.
 void setNumIterations(int value)
          Sets the number of iterations to perform.
 void stopExecution()
          Stops the execution.
 void updateProvenance(ProvenanceContainer cont)
          Updates the provenance information in the provided container.
 
Methods inherited from class adams.flow.transformer.AbstractGlobalPHMMClassifierEvaluator
getClassifier, getClassifierInstance, setClassifier
 
Methods inherited from class adams.flow.transformer.AbstractWekaClassifierEvaluator
generates, getOutput, outputTipText, reset, setOutput, wrapUp
 
Methods inherited from class adams.flow.transformer.AbstractTransformer
backupState, execute, input, postExecute, restoreState
 
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, debug, destroy, equals, findVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getPreviousSibling, getRoot, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, preExecute, pruneBackup, pruneBackup, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, skipTipText, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, globalInfo, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface adams.flow.core.Actor
cleanUp, compareTo, debug, destroy, equals, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getPreviousSibling, getRoot, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setUp, setVariables, sizeOf, stopExecution, variableChanged
 
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
 
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
 

Field Detail

m_Folds

protected int m_Folds
the number of folds.


m_NumIterations

protected int m_NumIterations
the number of iterations to perform.


m_IterationStepSize

protected int m_IterationStepSize
the step size for the iterations.


m_Iterator

protected transient weka.utils.AbstractIterativeEvaluation.EvaluationIterator m_Iterator
the evaluation iterator.


m_CurrentStep

protected weka.utils.AbstractIterativeEvaluation.EvaluationStep m_CurrentStep
the current evaluation step.

Constructor Detail

AbstractPHMMIterativeEvaluation

public AbstractPHMMIterativeEvaluation()
Method Detail

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractGlobalPHMMClassifierEvaluator<T extends IterativeHMMClassifier>

getQuickInfo

public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.

Specified by:
getQuickInfo in interface QuickInfoSupporter
Specified by:
getQuickInfo in interface Actor
Overrides:
getQuickInfo in class AbstractGlobalPHMMClassifierEvaluator<T extends IterativeHMMClassifier>
Returns:
null if no info available, otherwise short string

classifierTipText

public String classifierTipText()
Returns the tip text for this property.

Specified by:
classifierTipText in class AbstractGlobalPHMMClassifierEvaluator<T extends IterativeHMMClassifier>
Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

setFolds

public void setFolds(int value)
Sets the number of folds.

Parameters:
value - the folds, -1 for LOOCV

getFolds

public int getFolds()
Returns the number of folds.

Returns:
the folds

foldsTipText

public String foldsTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

setNumIterations

public void setNumIterations(int value)
Sets the number of iterations to perform.

Parameters:
value - the number of iterations

getNumIterations

public int getNumIterations()
Returns the number of iterations to perform.

Returns:
the number of iterations

numIterationsTipText

public String numIterationsTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

setIterationStepSize

public void setIterationStepSize(int value)
Sets the step size for the iterations.

Parameters:
value - the step size

getIterationStepSize

public int getIterationStepSize()
Returns the step size for the iterations.

Returns:
the step size

iterationStepSizeTipText

public String iterationStepSizeTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

accepts

public Class[] accepts()
Returns the class that the consumer accepts.

Specified by:
accepts in interface InputConsumer
Returns:
weka.core.Instances.class

newEvaluation

protected abstract E newEvaluation()
Instantiates a new evaluation object.

Returns:
the evaluation object

doExecute

protected String doExecute()
Executes the flow item.

Specified by:
doExecute in class AbstractActor
Returns:
null if everything is fine, otherwise error message

hasPendingOutput

public boolean hasPendingOutput()
Checks whether there is pending output to be collected after executing the flow item.

Specified by:
hasPendingOutput in interface OutputProducer
Overrides:
hasPendingOutput in class AbstractTransformer
Returns:
true if there is pending output

output

public Token output()
Returns the generated token.

Specified by:
output in interface OutputProducer
Overrides:
output in class AbstractTransformer
Returns:
the generated token

stopExecution

public void stopExecution()
Stops the execution. No message set.

Specified by:
stopExecution in interface Stoppable
Specified by:
stopExecution in interface Actor
Overrides:
stopExecution in class AbstractActor

updateProvenance

public void updateProvenance(ProvenanceContainer cont)
Updates the provenance information in the provided container.

Specified by:
updateProvenance in interface ProvenanceSupporter
Parameters:
cont - the provenance container to update


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.