adams.flow.transformer
Class AbstractWekaPredictionsTransformer

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.AbstractWekaPredictionsTransformer
All Implemented Interfaces:
AdditionalInformationHandler, CleanUpHandler, Debuggable, DebugOutputHandler, Destroyable, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractActor>, SizeOfHandler, Stoppable, VariableChangeListener, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable
Direct Known Subclasses:
WekaPredictionsToInstances

public abstract class AbstractWekaPredictionsTransformer
extends AbstractTransformer

Ancestor for transformers that convert the predictions stored in an Evaluation object into a different format.

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

Field Summary
protected  boolean m_AddLabelIndex
          whether to prefix the labels with a 1-based index (only nominal classes).
protected  boolean m_ShowDistribution
          whether to output the class distribution (only nominal classes).
protected  boolean m_ShowError
          whether to add an error colunm.
protected  boolean m_ShowProbability
          whether to output the probability of the prediction (only nominal classes).
protected  boolean m_ShowWeight
          whether to output the weight as well.
 
Fields inherited from class adams.flow.transformer.AbstractTransformer
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken
 
Fields inherited from class adams.flow.core.AbstractActor
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, 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
 
Constructor Summary
AbstractWekaPredictionsTransformer()
           
 
Method Summary
 Class[] accepts()
          Returns the class that the consumer accepts.
 String addLabelIndexTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
 boolean getAddLabelIndex()
          Returns whether to show the error as well.
 boolean getShowDistribution()
          Returns whether to show the class distribution as well.
 boolean getShowError()
          Returns whether to show the error as well.
 boolean getShowProbability()
          Returns whether to show the probability as well.
 boolean getShowWeight()
          Returns whether to show the weight as well.
 void setAddLabelIndex(boolean value)
          Sets whether to prefix the labels with the index.
 void setShowDistribution(boolean value)
          Sets whether to show the class distribution as well.
 void setShowError(boolean value)
          Sets whether to show the error as well.
 void setShowProbability(boolean value)
          Sets whether to show the probability of the prediction as well.
 void setShowWeight(boolean value)
          Sets whether to show the weight as well.
 String showDistributionTipText()
          Returns the tip text for this property.
 String showErrorTipText()
          Returns the tip text for this property.
 String showProbabilityTipText()
          Returns the tip text for this property.
 String showWeightTipText()
          Returns the tip text for this property.
 
Methods inherited from class adams.flow.transformer.AbstractTransformer
backupState, execute, hasPendingOutput, input, output, postExecute, reset, restoreState, wrapUp
 
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, debug, destroy, doExecute, equals, findVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFullName, getName, getNextSibling, getParent, getPreviousSibling, getQuickInfo, getRoot, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, preExecute, pruneBackup, pruneBackup, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, skipTipText, stopExecution, 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.OutputProducer
generates
 

Field Detail

m_AddLabelIndex

protected boolean m_AddLabelIndex
whether to prefix the labels with a 1-based index (only nominal classes).


m_ShowError

protected boolean m_ShowError
whether to add an error colunm.


m_ShowProbability

protected boolean m_ShowProbability
whether to output the probability of the prediction (only nominal classes).


m_ShowDistribution

protected boolean m_ShowDistribution
whether to output the class distribution (only nominal classes).


m_ShowWeight

protected boolean m_ShowWeight
whether to output the weight as well.

Constructor Detail

AbstractWekaPredictionsTransformer

public AbstractWekaPredictionsTransformer()
Method Detail

defineOptions

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

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractActor

setAddLabelIndex

public void setAddLabelIndex(boolean value)
Sets whether to prefix the labels with the index.

Parameters:
value - true if the label is prefixed with the index

getAddLabelIndex

public boolean getAddLabelIndex()
Returns whether to show the error as well.

Returns:
true if the label is prefixed with the index

addLabelIndexTipText

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

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

setShowError

public void setShowError(boolean value)
Sets whether to show the error as well.

Parameters:
value - true if the error is to be displayed as well

getShowError

public boolean getShowError()
Returns whether to show the error as well.

Returns:
true if the error is displayed as well

showErrorTipText

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

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

setShowProbability

public void setShowProbability(boolean value)
Sets whether to show the probability of the prediction as well.

Parameters:
value - true if the probability is to be displayed as well

getShowProbability

public boolean getShowProbability()
Returns whether to show the probability as well.

Returns:
true if the probability is displayed as well

showProbabilityTipText

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

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

setShowDistribution

public void setShowDistribution(boolean value)
Sets whether to show the class distribution as well.

Parameters:
value - true if the class distribution is to be displayed as well

getShowDistribution

public boolean getShowDistribution()
Returns whether to show the class distribution as well.

Returns:
true if the class distribution is displayed as well

showDistributionTipText

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

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

setShowWeight

public void setShowWeight(boolean value)
Sets whether to show the weight as well.

Parameters:
value - true if the weight is to be displayed as well

getShowWeight

public boolean getShowWeight()
Returns whether to show the weight as well.

Returns:
true if the weight is displayed as well

showWeightTipText

public String showWeightTipText()
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.

Returns:
weka.classifiers.Evaluation.class


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