Class ClassifierErrors
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.wekainvestigator.output.AbstractOutputGenerator<ResultItem>
-
- adams.gui.tools.wekainvestigator.tab.classifytab.output.AbstractOutputGenerator
-
- adams.gui.tools.wekainvestigator.tab.classifytab.output.ClassifierErrors
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,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 AutoOnOff
m_AntiAliasingEnabled
whether anti-aliasing is enabled.protected XYSequencePaintlet
m_CustomPaintlet
the custom paintlet.protected int
m_Diameter
the diameter of the cross.protected ActualVsPredictedPlot.LimitType
m_Limit
the limit type.protected AbstractMetaDataColor
m_MetaDataColor
for obtaining the color from the meta-data.protected 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
-
-
Constructor Summary
Constructors Constructor Description ClassifierErrors()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
actualMaxTipText()
Returns the tip text for this property.String
actualMinTipText()
Returns the tip text for this property.String
antiAliasingEnabledTipText()
Returns the tip text for this property.boolean
canGenerateOutput(ResultItem item)
Checks whether output can be generated from this item.JComponent
createOutput(ResultItem item, MessageCollection errors)
Generates output from the item.protected ComponentContentPanel
createOutput(weka.classifiers.Evaluation eval, int[] originalIndices, SpreadSheet additionalAttributes, MessageCollection errors)
Generates a plot actor from the evaluation.String
customPaintletTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
diameterTipText()
Returns the tip text for this property.double
getActualMax()
Returns the upper limit in use for the actual values.double
getActualMin()
Returns the lower limit in use for the actual values.XYSequencePaintlet
getCustomPaintlet()
Returns the custom paintlet.int
getDiameter()
Returns the diameter of the cross.ActualVsPredictedPlot.LimitType
getLimit()
Returns the limit to impose on the axes.AbstractMetaDataColor
getMetaDataColor()
Returns the scheme for extracting the color from the meta-data.XYSequencePaintlet[]
getOverlays()
Returns the overlays to use in the plot.double
getPredictedMax()
Returns the upper limit in use for the predicted values.double
getPredictedMin()
Returns the lower limit in use for the predicted values.boolean
getSwapAxes()
Returns whether to swap the axes.String
getTitle()
The title to use for the tab.boolean
getUseCustomPaintlet()
Returns whether to use the custom paintlet.boolean
getUseError()
Returns whether to use the error for the cross size.String
globalInfo()
Returns a string describing the object.AutoOnOff
isAntiAliasingEnabled()
Returns whether anti-aliasing is used.String
limitTipText()
Returns the tip text for this property.String
metaDataColorTipText()
Returns the tip text for this property.String
overlaysTipText()
Returns the tip text for this property.String
predictedMaxTipText()
Returns the tip text for this property.String
predictedMinTipText()
Returns the tip text for this property.void
setActualMax(double value)
Sets the upper limit in use for the actual values.void
setActualMin(double value)
Sets the lower limit in use for the actual values.void
setAntiAliasingEnabled(AutoOnOff value)
Sets whether to use anti-aliasing.void
setCustomPaintlet(XYSequencePaintlet value)
Sets the custom paintlet.void
setDiameter(int value)
Sets the cross diameter.void
setLimit(ActualVsPredictedPlot.LimitType value)
Sets the limit to impose on the axes.void
setMetaDataColor(AbstractMetaDataColor value)
Sets the scheme for extracting the color from the meta-data.void
setOverlays(XYSequencePaintlet[] value)
Sets the overlays to use in the plot.void
setPredictedMax(double value)
Sets the upper limit in use for the predicted values.void
setPredictedMin(double value)
Sets the lower limit in use for the predicted values.void
setSwapAxes(boolean value)
Sets whether to swap the axes.void
setUseCustomPaintlet(boolean value)
Sets whether to use the custom paintlet.void
setUseError(boolean value)
Sets whether to use the numeric error for the cross size.String
swapAxesTipText()
Returns the tip text for this property.String
useCustomPaintletTipText()
Returns the tip text for this property.String
useErrorTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.tools.wekainvestigator.tab.classifytab.output.AbstractOutputGenerator
addPage, newMultiPagePane
-
Methods inherited from class adams.gui.tools.wekainvestigator.output.AbstractOutputGenerator
addTab, generateOutput
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
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 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 AutoOnOff m_AntiAliasingEnabled
whether anti-aliasing is enabled.
-
m_MetaDataColor
protected 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 XYSequencePaintlet m_CustomPaintlet
the custom paintlet.
-
m_Overlays
protected XYSequencePaintlet[] m_Overlays
the overlays to use.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
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(ActualVsPredictedPlot.LimitType value)
Sets the limit to impose on the axes.- Parameters:
value
- the limit type
-
getLimit
public 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.
-
getTitle
public String getTitle()
The title to use for the tab.- Specified by:
getTitle
in classAbstractOutputGenerator<ResultItem>
- Returns:
- the title
-
setAntiAliasingEnabled
public void setAntiAliasingEnabled(AutoOnOff value)
Sets whether to use anti-aliasing.- Parameters:
value
- if anti-aliasing is used
-
isAntiAliasingEnabled
public 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(AbstractMetaDataColor value)
Sets the scheme for extracting the color from the meta-data.- Parameters:
value
- the scheme
-
getMetaDataColor
public 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(XYSequencePaintlet value)
Sets the custom paintlet.- Parameters:
value
- the paintlet
-
getCustomPaintlet
public 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(XYSequencePaintlet[] value)
Sets the overlays to use in the plot.- Parameters:
value
- the overlays
-
getOverlays
public 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.
-
canGenerateOutput
public boolean canGenerateOutput(ResultItem item)
Checks whether output can be generated from this item.- Specified by:
canGenerateOutput
in classAbstractOutputGenerator<ResultItem>
- Parameters:
item
- the item to check- Returns:
- true if output can be generated
-
createOutput
protected ComponentContentPanel createOutput(weka.classifiers.Evaluation eval, int[] originalIndices, SpreadSheet additionalAttributes, MessageCollection errors)
Generates a plot actor from the evaluation.- Parameters:
eval
- the evaluation to useoriginalIndices
- the original indices, can be nulladditionalAttributes
- the additional attribute to use, can be nullerrors
- for collecting errors- Returns:
- the generated panel, null if failed to generate
-
createOutput
public JComponent createOutput(ResultItem item, MessageCollection errors)
Generates output from the item.- Specified by:
createOutput
in classAbstractOutputGenerator<ResultItem>
- Parameters:
item
- the item to generate output forerrors
- for collecting error messages- Returns:
- the output component, null if failed to generate
-
-