Class WekaClassifierErrors

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ClearableDisplay, DisplayTypeSupporter, ErrorHandler, InputConsumer, ComponentSupplier, DisplayPanelProvider, MenuBarProvider, SendToActionSupporter, Serializable, Comparable

    public class WekaClassifierErrors
    extends AbstractGraphicalDisplay
    implements DisplayPanelProvider
    Actor for displaying classifier errors.

    Input/output:
    - accepts:
       weka.classifiers.Evaluation


    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to 
        the console (0 = off).
        default: 0
        minimum: 0
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: WekaClassifierErrors
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
     
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
     
    -width <int> (property: width)
        The width of the dialog.
        default: 640
        minimum: 1
     
    -height <int> (property: height)
        The height of the dialog.
        default: 480
        minimum: 1
     
    -x <int> (property: x)
        The X position of the dialog (>=0: absolute, -1: left, -2: center, -3: right
        ).
        default: -1
        minimum: -3
     
    -y <int> (property: y)
        The Y position of the dialog (>=0: absolute, -1: top, -2: center, -3: bottom
        ).
        default: -1
        minimum: -3
     
    -writer <adams.gui.print.JComponentWriter> (property: writer)
        The writer to use for generating the graphics output.
        default: adams.gui.print.NullWriter
     
    -scaler <adams.data.weka.predictions.AbstractErrorScaler> (property: errorScaler)
        The scaler to use for scaling the errors.
        default: adams.data.weka.predictions.AutoScaler -scaler adams.data.weka.predictions.RelativeNumericErrorScaler
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_VisualizePanel

        protected weka.gui.visualize.VisualizePanel m_VisualizePanel
        the Weka plot panel.
      • m_ErrorScaler

        protected AbstractErrorScaler m_ErrorScaler
        The scheme for scaling the errors.
    • Constructor Detail

      • WekaClassifierErrors

        public WekaClassifierErrors()
    • Method Detail

      • getDefaultWidth

        protected int getDefaultWidth()
        Returns the default width for the dialog.
        Overrides:
        getDefaultWidth in class AbstractDisplay
        Returns:
        the default width
      • getDefaultHeight

        protected int getDefaultHeight()
        Returns the default height for the dialog.
        Overrides:
        getDefaultHeight in class AbstractDisplay
        Returns:
        the default height
      • setErrorScaler

        public void setErrorScaler​(AbstractErrorScaler value)
        Sets the scheme for scaling the errors.
        Parameters:
        value - the scheme
      • getErrorScaler

        public AbstractErrorScaler getErrorScaler()
        Returns the scheme to use for scaling the errors.
        Returns:
        the scheme
      • errorScalerTipText

        public String errorScalerTipText()
        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.classifiers.Evaluation.class
      • display

        protected void display​(Token token)
        ClassifierErrorss the token (the panel and dialog have already been created at this stage).
        Specified by:
        display in class AbstractDisplay
        Parameters:
        token - the token to display
      • getEvaluation

        protected weka.classifiers.Evaluation getEvaluation​(Token token)
        Returns the Evaluation object from the token.
        Parameters:
        token - the token to extract the Evaluation object from
        Returns:
        the Evaluation object
      • displayPanelRequiresScrollPane

        public boolean displayPanelRequiresScrollPane()
        Returns whether the created display panel requires a scroll pane or not.
        Specified by:
        displayPanelRequiresScrollPane in interface DisplayPanelProvider
        Returns:
        true if the display panel requires a scroll pane