Class AbstractWekaClassifierEvaluator

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<adams.flow.core.Actor>, adams.core.SizeOfHandler, adams.core.Stoppable, adams.core.StoppableWithFeedback, adams.core.VariablesInspectionHandler, adams.event.VariableChangeListener, adams.flow.core.Actor, adams.flow.core.ErrorHandler, adams.flow.core.InputConsumer, adams.flow.core.OutputProducer, Serializable, Comparable
    Direct Known Subclasses:
    AbstractCallableWekaClassifierEvaluator, WekaTestSetEvaluator

    public abstract class AbstractWekaClassifierEvaluator
    extends adams.flow.transformer.AbstractTransformer
    Ancestor for transformers that evaluate classifiers.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean m_AlwaysUseContainer
      whether to always use a container.
      protected weka.classifiers.evaluation.output.prediction.AbstractOutput m_Output
      for generating predictions output.
      protected StringBuffer m_OutputBuffer
      the buffer for the predictions.
      • 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_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
      • Fields inherited from interface adams.flow.core.Actor

        FILE_EXTENSION, FILE_EXTENSION_GZ
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String alwaysUseContainerTipText()
      Returns the tip text for this property.
      protected void cleanOutputBuffer()
      Cleans up the output buffer.
      void defineOptions()
      Adds options to the internal list of options.
      Class[] generates()
      Returns the class of objects that it generates.
      boolean getAlwaysUseContainer()
      Returns whether to always use an evaluation container as output.
      weka.classifiers.evaluation.output.prediction.AbstractOutput getOutput()
      Returns the prediction output generator in use.
      protected void initOutputBuffer()
      Initializes the output buffer.
      String outputTipText()
      Returns the tip text for this property.
      protected void reset()
      Resets the scheme.
      void setAlwaysUseContainer​(boolean value)
      Sets whether to always use an evaluation container as output.
      void setOutput​(weka.classifiers.evaluation.output.prediction.AbstractOutput value)
      Sets the prediction output generator to use.
      void wrapUp()
      Cleans up after the execution has finished.
      • Methods inherited from class adams.flow.transformer.AbstractTransformer

        backupState, currentInput, execute, hasInput, hasPendingOutput, input, output, postExecute, restoreState
      • Methods inherited from class adams.flow.core.AbstractActor

        annotationsTipText, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, configureLogger, destroy, doExecute, equals, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getQuickInfo, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, preExecute, pruneBackup, pruneBackup, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
      • Methods inherited from interface adams.flow.core.Actor

        cleanUp, compareTo, destroy, equals, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getQuickInfo, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged
      • Methods inherited from interface adams.core.AdditionalInformationHandler

        getAdditionalInformation
      • Methods inherited from interface adams.flow.core.InputConsumer

        accepts
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel, setLoggingLevel
      • Methods inherited from interface adams.core.logging.LoggingSupporter

        getLogger, isLoggingEnabled
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, getOptionManager
      • Methods inherited from interface adams.core.VariablesInspectionHandler

        canInspectOptions
    • Field Detail

      • m_Output

        protected weka.classifiers.evaluation.output.prediction.AbstractOutput m_Output
        for generating predictions output.
      • m_OutputBuffer

        protected StringBuffer m_OutputBuffer
        the buffer for the predictions.
      • m_AlwaysUseContainer

        protected boolean m_AlwaysUseContainer
        whether to always use a container.
    • Constructor Detail

      • AbstractWekaClassifierEvaluator

        public AbstractWekaClassifierEvaluator()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.flow.core.AbstractActor
      • setOutput

        public void setOutput​(weka.classifiers.evaluation.output.prediction.AbstractOutput value)
        Sets the prediction output generator to use.
        Parameters:
        value - the output generator
      • getOutput

        public weka.classifiers.evaluation.output.prediction.AbstractOutput getOutput()
        Returns the prediction output generator in use.
        Returns:
        the output generator
      • outputTipText

        public String outputTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setAlwaysUseContainer

        public void setAlwaysUseContainer​(boolean value)
        Sets whether to always use an evaluation container as output.
        Parameters:
        value - true if to always use container
      • getAlwaysUseContainer

        public boolean getAlwaysUseContainer()
        Returns whether to always use an evaluation container as output.
        Returns:
        true if to always use container
      • alwaysUseContainerTipText

        public String alwaysUseContainerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        String.class or weka.classifiers.Evaluation.class
      • reset

        protected void reset()
        Resets the scheme.
        Overrides:
        reset in class adams.flow.core.AbstractActor
      • initOutputBuffer

        protected void initOutputBuffer()
        Initializes the output buffer.
      • cleanOutputBuffer

        protected void cleanOutputBuffer()
        Cleans up the output buffer.
      • wrapUp

        public void wrapUp()
        Cleans up after the execution has finished.
        Specified by:
        wrapUp in interface adams.flow.core.Actor
        Overrides:
        wrapUp in class adams.flow.transformer.AbstractTransformer