Class ClassifierErrors

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, Serializable

    public class ClassifierErrors
    extends AbstractOutputGenerator
    Generates classifier errors plot.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double m_ActualMax
      the maximum to use for the actual values (pos inf = no restriction).
      protected double m_ActualMin
      the minimum to use for the actual values (neg inf = no restriction).
      protected adams.core.AutoOnOff m_AntiAliasingEnabled
      whether anti-aliasing is enabled.
      protected adams.gui.visualization.sequence.XYSequencePaintlet m_CustomPaintlet
      the custom paintlet.
      protected int m_Diameter
      the diameter of the cross.
      protected adams.flow.sink.ActualVsPredictedPlot.LimitType m_Limit
      the limit type.
      protected adams.gui.visualization.sequence.metadatacolor.AbstractMetaDataColor m_MetaDataColor
      for obtaining the color from the meta-data.
      protected adams.gui.visualization.sequence.XYSequencePaintlet[] m_Overlays
      the overlays to use.
      protected double m_PredictedMax
      the maximum to use for the predicted values (pos inf = no restriction).
      protected double m_PredictedMin
      the minimum to use for the predicted values (neg inf = no restriction).
      protected boolean m_SwapAxes
      whether to swap the axes.
      protected boolean m_UseCustomPaintlet
      whether to use a custom paintlet.
      protected boolean m_UseError
      whether to use the error for the cross-size.
      static int MAX_DATA_POINTS
      the maximum number of data points before turning off anti-aliasing.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

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

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Field Detail

      • MAX_DATA_POINTS

        public static final int MAX_DATA_POINTS
        the maximum number of data points before turning off anti-aliasing.
        See Also:
        Constant Field Values
      • m_Limit

        protected adams.flow.sink.ActualVsPredictedPlot.LimitType m_Limit
        the limit type.
      • m_ActualMin

        protected double m_ActualMin
        the minimum to use for the actual values (neg inf = no restriction).
      • m_ActualMax

        protected double m_ActualMax
        the maximum to use for the actual values (pos inf = no restriction).
      • m_PredictedMin

        protected double m_PredictedMin
        the minimum to use for the predicted values (neg inf = no restriction).
      • m_PredictedMax

        protected double m_PredictedMax
        the maximum to use for the predicted values (pos inf = no restriction).
      • m_SwapAxes

        protected boolean m_SwapAxes
        whether to swap the axes.
      • m_Diameter

        protected int m_Diameter
        the diameter of the cross.
      • m_UseError

        protected boolean m_UseError
        whether to use the error for the cross-size.
      • m_AntiAliasingEnabled

        protected adams.core.AutoOnOff m_AntiAliasingEnabled
        whether anti-aliasing is enabled.
      • m_MetaDataColor

        protected adams.gui.visualization.sequence.metadatacolor.AbstractMetaDataColor m_MetaDataColor
        for obtaining the color from the meta-data.
      • m_UseCustomPaintlet

        protected boolean m_UseCustomPaintlet
        whether to use a custom paintlet.
      • m_CustomPaintlet

        protected adams.gui.visualization.sequence.XYSequencePaintlet m_CustomPaintlet
        the custom paintlet.
      • m_Overlays

        protected adams.gui.visualization.sequence.XYSequencePaintlet[] m_Overlays
        the overlays to use.
    • Constructor Detail

      • ClassifierErrors

        public ClassifierErrors()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • 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.core.option.AbstractOptionHandler
      • setActualMin

        public void setActualMin​(double value)
        Sets the lower limit in use for the actual values.
        Parameters:
        value - the limit, neg inf if unlimited
      • getActualMin

        public double getActualMin()
        Returns the lower limit in use for the actual values.
        Returns:
        the limit, neg inf if unlimited
      • actualMinTipText

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

        public void setActualMax​(double value)
        Sets the upper limit in use for the actual values.
        Parameters:
        value - the limit, pos inf if unlimited
      • getActualMax

        public double getActualMax()
        Returns the upper limit in use for the actual values.
        Returns:
        the limit, pos inf if unlimited
      • actualMaxTipText

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

        public void setPredictedMin​(double value)
        Sets the lower limit in use for the predicted values.
        Parameters:
        value - the limit, neg inf if unlimited
      • getPredictedMin

        public double getPredictedMin()
        Returns the lower limit in use for the predicted values.
        Returns:
        the limit, neg inf if unlimited
      • predictedMinTipText

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

        public void setPredictedMax​(double value)
        Sets the upper limit in use for the predicted values.
        Parameters:
        value - the limit, pos inf if unlimited
      • getPredictedMax

        public double getPredictedMax()
        Returns the upper limit in use for the predicted values.
        Returns:
        the limit, pos inf if unlimited
      • predictedMaxTipText

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

        public void setSwapAxes​(boolean value)
        Sets whether to swap the axes.
        Parameters:
        value - true if to swap
      • getSwapAxes

        public boolean getSwapAxes()
        Returns whether to swap the axes.
        Returns:
        true if to swap
      • swapAxesTipText

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

        public void setLimit​(adams.flow.sink.ActualVsPredictedPlot.LimitType value)
        Sets the limit to impose on the axes.
        Parameters:
        value - the limit type
      • getLimit

        public adams.flow.sink.ActualVsPredictedPlot.LimitType getLimit()
        Returns the limit to impose on the axes.
        Returns:
        the limit type
      • limitTipText

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

        public void setDiameter​(int value)
        Sets the cross diameter.
        Parameters:
        value - the diameter
      • getDiameter

        public int getDiameter()
        Returns the diameter of the cross.
        Returns:
        the diameter
      • diameterTipText

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

        public void setUseError​(boolean value)
        Sets whether to use the numeric error for the cross size.
        Parameters:
        value - true if to use error
      • getUseError

        public boolean getUseError()
        Returns whether to use the error for the cross size.
        Returns:
        true if to use error
      • useErrorTipText

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

        public void setAntiAliasingEnabled​(adams.core.AutoOnOff value)
        Sets whether to use anti-aliasing.
        Parameters:
        value - if anti-aliasing is used
      • isAntiAliasingEnabled

        public adams.core.AutoOnOff isAntiAliasingEnabled()
        Returns whether anti-aliasing is used.
        Returns:
        if anti-aliasing is used
      • antiAliasingEnabledTipText

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

        public void setMetaDataColor​(adams.gui.visualization.sequence.metadatacolor.AbstractMetaDataColor value)
        Sets the scheme for extracting the color from the meta-data.
        Parameters:
        value - the scheme
      • getMetaDataColor

        public adams.gui.visualization.sequence.metadatacolor.AbstractMetaDataColor getMetaDataColor()
        Returns the scheme for extracting the color from the meta-data.
        Returns:
        the scheme
      • metaDataColorTipText

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

        public void setUseCustomPaintlet​(boolean value)
        Sets whether to use the custom paintlet.
        Parameters:
        value - true if custom
      • getUseCustomPaintlet

        public boolean getUseCustomPaintlet()
        Returns whether to use the custom paintlet.
        Returns:
        true if custom
      • useCustomPaintletTipText

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

        public void setCustomPaintlet​(adams.gui.visualization.sequence.XYSequencePaintlet value)
        Sets the custom paintlet.
        Parameters:
        value - the paintlet
      • getCustomPaintlet

        public adams.gui.visualization.sequence.XYSequencePaintlet getCustomPaintlet()
        Returns the custom paintlet.
        Returns:
        the paintlet
      • customPaintletTipText

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

        public void setOverlays​(adams.gui.visualization.sequence.XYSequencePaintlet[] value)
        Sets the overlays to use in the plot.
        Parameters:
        value - the overlays
      • getOverlays

        public adams.gui.visualization.sequence.XYSequencePaintlet[] getOverlays()
        Returns the overlays to use in the plot.
        Returns:
        the overlays
      • overlaysTipText

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

        protected ComponentContentPanel createOutput​(weka.classifiers.Evaluation eval,
                                                     int[] originalIndices,
                                                     adams.data.spreadsheet.SpreadSheet additionalAttributes,
                                                     adams.core.MessageCollection errors)
        Generates a plot actor from the evaluation.
        Parameters:
        eval - the evaluation to use
        originalIndices - the original indices, can be null
        additionalAttributes - the additional attribute to use, can be null
        errors - for collecting errors
        Returns:
        the generated panel, null if failed to generate
      • createOutput

        public JComponent createOutput​(ResultItem item,
                                       adams.core.MessageCollection errors)
        Generates output from the item.
        Specified by:
        createOutput in class AbstractOutputGenerator<ResultItem>
        Parameters:
        item - the item to generate output for
        errors - for collecting error messages
        Returns:
        the output component, null if failed to generate