Class TextOutput
- 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.experimenttab.output.AbstractOutputGenerator
-
- adams.gui.tools.wekainvestigator.tab.experimenttab.output.TextOutput
-
- 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 TextOutput extends AbstractOutputGenerator
Generates textual output.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.base.BaseString[]m_Columnthe column (= classifiers).protected ExperimentStatisticm_ComparisonFieldthe comparison field.protected weka.experiment.ResultMatrixm_OutputFormatthe output format.protected booleanm_OutputHeaderwhether to output the header.protected adams.core.base.BaseString[]m_Rowthe row (= datasets).protected booleanm_RunInformationwhether to print the run information as well.protected doublem_Significancethe significance.protected booleanm_SwapRowsAndColumnswhether to swap rows and columns.protected intm_TestBasethe test base.protected weka.experiment.Testerm_Testerthe tester class to use.
-
Constructor Summary
Constructors Constructor Description TextOutput()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanGenerateOutput(ResultItem item)Checks whether output can be generated from this item.StringcolumnTipText()Returns the tip text for this property.StringcomparisonFieldTipText()Returns the tip text for this property.JComponentcreateOutput(ResultItem item, adams.core.MessageCollection errors)Generates output from the item.voiddefineOptions()Adds options to the internal list of options.adams.core.base.BaseString[]getColumn()Returns the list of fields that identify a column.ExperimentStatisticgetComparisonField()Returns the comparison field.weka.experiment.ResultMatrixgetOutputFormat()Returns the output format in use for generating the output.booleangetOutputHeader()Returns whether to output the header of the result matrix as well.adams.core.base.BaseString[]getRow()Returns the list of fields that identify a row.booleangetRunInformation()Returns whether the run information is output as well.doublegetSignificance()Returns the current significance level (0-1).booleangetSwapRowsAndColumns()Returns whether to swap rows and columns.intgetTestBase()Returns the index of the test base.weka.experiment.TestergetTester()Returns the Tester in use.StringgetTitle()The title to use for the tab.StringglobalInfo()Returns a string describing the object.StringoutputFormatTipText()Returns the tip text for this property.StringoutputHeaderTipText()Returns the tip text for this property.StringrowTipText()Returns the tip text for this property.StringrunInformationTipText()Returns the tip text for this property.voidsetColumn(adams.core.base.BaseString[] value)Sets list of fields that identify a column.voidsetComparisonField(ExperimentStatistic value)Sets the comparison field.voidsetOutputFormat(weka.experiment.ResultMatrix value)Sets the output format to use for generating the output.voidsetOutputHeader(boolean value)Sets whether to output the header of the result matrix as well.voidsetRow(adams.core.base.BaseString[] value)Sets the list of fields that identify a row.voidsetRunInformation(boolean value)Sets whether the run information is output as well.voidsetSignificance(double value)Sets the significance level (0-1).voidsetSwapRowsAndColumns(boolean value)Sets whether to swap rows and columns.voidsetTestBase(int value)Sets the index of the test base.voidsetTester(weka.experiment.Tester value)Sets the Tester to use.StringsignificanceTipText()Returns the tip text for this property.StringswapRowsAndColumnsTipText()Returns the tip text for this property.StringtestBaseTipText()Returns the tip text for this property.StringtesterTipText()Returns the tip text for this property.-
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
-
-
-
-
Field Detail
-
m_Tester
protected weka.experiment.Tester m_Tester
the tester class to use.
-
m_ComparisonField
protected ExperimentStatistic m_ComparisonField
the comparison field.
-
m_Significance
protected double m_Significance
the significance.
-
m_TestBase
protected int m_TestBase
the test base.
-
m_Row
protected adams.core.base.BaseString[] m_Row
the row (= datasets).
-
m_Column
protected adams.core.base.BaseString[] m_Column
the column (= classifiers).
-
m_SwapRowsAndColumns
protected boolean m_SwapRowsAndColumns
whether to swap rows and columns.
-
m_OutputFormat
protected weka.experiment.ResultMatrix m_OutputFormat
the output format.
-
m_OutputHeader
protected boolean m_OutputHeader
whether to output the header.
-
m_RunInformation
protected boolean m_RunInformation
whether to print the run information as well.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
setTester
public void setTester(weka.experiment.Tester value)
Sets the Tester to use.- Parameters:
value- the Tester
-
getTester
public weka.experiment.Tester getTester()
Returns the Tester in use.- Returns:
- the Tester
-
testerTipText
public String testerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setComparisonField
public void setComparisonField(ExperimentStatistic value)
Sets the comparison field.- Parameters:
value- the field
-
getComparisonField
public ExperimentStatistic getComparisonField()
Returns the comparison field.- Returns:
- the string
-
comparisonFieldTipText
public String comparisonFieldTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSignificance
public void setSignificance(double value)
Sets the significance level (0-1).- Parameters:
value- the significance
-
getSignificance
public double getSignificance()
Returns the current significance level (0-1).- Returns:
- the significance
-
significanceTipText
public String significanceTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTestBase
public void setTestBase(int value)
Sets the index of the test base.- Parameters:
value- the index
-
getTestBase
public int getTestBase()
Returns the index of the test base.- Returns:
- the index
-
testBaseTipText
public String testBaseTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRow
public void setRow(adams.core.base.BaseString[] value)
Sets the list of fields that identify a row.- Parameters:
value- the list of fields
-
getRow
public adams.core.base.BaseString[] getRow()
Returns the list of fields that identify a row.- Returns:
- the array of fields
-
rowTipText
public String rowTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColumn
public void setColumn(adams.core.base.BaseString[] value)
Sets list of fields that identify a column.- Parameters:
value- the list of fields
-
getColumn
public adams.core.base.BaseString[] getColumn()
Returns the list of fields that identify a column.- Returns:
- the array of fields
-
columnTipText
public String columnTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSwapRowsAndColumns
public void setSwapRowsAndColumns(boolean value)
Sets whether to swap rows and columns.- Parameters:
value- true if to swap rows and columns
-
getSwapRowsAndColumns
public boolean getSwapRowsAndColumns()
Returns whether to swap rows and columns.- Returns:
- true if swapping rows and columns
-
swapRowsAndColumnsTipText
public String swapRowsAndColumnsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputFormat
public void setOutputFormat(weka.experiment.ResultMatrix value)
Sets the output format to use for generating the output.- Parameters:
value- the format
-
getOutputFormat
public weka.experiment.ResultMatrix getOutputFormat()
Returns the output format in use for generating the output.- Returns:
- the format
-
outputFormatTipText
public String outputFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputHeader
public void setOutputHeader(boolean value)
Sets whether to output the header of the result matrix as well.- Parameters:
value- true if to output the header as well
-
getOutputHeader
public boolean getOutputHeader()
Returns whether to output the header of the result matrix as well.- Returns:
- true if to output the header as well
-
outputHeaderTipText
public String outputHeaderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRunInformation
public void setRunInformation(boolean value)
Sets whether the run information is output as well.- Parameters:
value- if true then the run information is output as well
-
getRunInformation
public boolean getRunInformation()
Returns whether the run information is output as well.- Returns:
- true if the run information is output as well
-
runInformationTipText
public String runInformationTipText()
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:
getTitlein classAbstractOutputGenerator<ResultItem>- Returns:
- the title
-
canGenerateOutput
public boolean canGenerateOutput(ResultItem item)
Checks whether output can be generated from this item.- Specified by:
canGenerateOutputin classAbstractOutputGenerator<ResultItem>- Parameters:
item- the item to check- Returns:
- true if output can be generated
-
createOutput
public JComponent createOutput(ResultItem item, adams.core.MessageCollection errors)
Generates output from the item.- Specified by:
createOutputin classAbstractOutputGenerator<ResultItem>- Parameters:
item- the item to generate output forerrors- for collecting error messages- Returns:
- the output component, null if failed to generate
-
-