Package weka.experiment
Interface Tester
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
PairedCorrectedTTester
,PairedTTester
public interface Tester extends java.io.Serializable
Interface for different kinds of Testers in the Experimenter.- Version:
- $Revision: 1.4 $
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assign(Tester tester)
retrieves all the settings from the given TesterPairedStats
calculateStatistics(Instance datasetSpecifier, int resultset1Index, int resultset2Index, int comparisonColumn)
Computes a paired t-test comparison for a specified dataset between two resultsets.boolean
displayResultset(int index)
Checks whether the resultset with the given index shall be displayed.Range
getDatasetKeyColumns()
Get the value of DatasetKeyColumns.int[]
getDisplayedResultsets()
Gets the indices of the the datasets that are displayed (ifnull
then all are displayed).java.lang.String
getDisplayName()
returns the name of the testing algorithmint
getFoldColumn()
Get the value of FoldColumn.Instances
getInstances()
Get the value of Instances.int
getNumDatasets()
Gets the number of datasets in the resultsetsint
getNumResultsets()
Gets the number of resultsets in the data.ResultMatrix
getResultMatrix()
Gets the instance that produces the output.Range
getResultsetKeyColumns()
Get the value of ResultsetKeyColumns.java.lang.String
getResultsetName(int index)
Gets a string descriptive of the specified resultset.int
getRunColumn()
Get the value of RunColumn.boolean
getShowStdDevs()
Returns true if standard deviations have been requested.double
getSignificanceLevel()
Get the value of SignificanceLevel.int
getSortColumn()
Returns the column to sort on, -1 means the default sorting.java.lang.String
getSortColumnName()
Returns the name of the column to sort on.java.lang.String
getToolTipText()
returns a string that is displayed as tooltip on the "perform test" button in the experimenterjava.lang.String
header(int comparisonColumn)
Creates a "header" string describing the current resultsets.java.lang.String
multiResultsetFull(int baseResultset, int comparisonColumn)
Creates a comparison table where a base resultset is compared to the other resultsets.java.lang.String
multiResultsetRanking(int comparisonColumn)
java.lang.String
multiResultsetSummary(int comparisonColumn)
Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other.int[][]
multiResultsetWins(int comparisonColumn, int[][] nonSigWin)
Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other.java.lang.String
resultsetKey()
Creates a key that maps resultset numbers to their descriptions.void
setDatasetKeyColumns(Range newDatasetKeyColumns)
Set the value of DatasetKeyColumns.void
setDisplayedResultsets(int[] cols)
Sets the indicies of the datasets to display (null
means all).void
setFoldColumn(int newFoldColumn)
Set the value of FoldColumn.void
setInstances(Instances newInstances)
Set the value of Instances.void
setResultMatrix(ResultMatrix matrix)
Sets the matrix to use to produce the output.void
setResultsetKeyColumns(Range newResultsetKeyColumns)
Set the value of ResultsetKeyColumns.void
setRunColumn(int newRunColumn)
Set the value of RunColumn.void
setShowStdDevs(boolean s)
Set whether standard deviations are displayed or not.void
setSignificanceLevel(double newSignificanceLevel)
Set the value of SignificanceLevel.void
setSortColumn(int newSortColumn)
Set the column to sort on, -1 means the default sorting.
-
-
-
Method Detail
-
getDisplayName
java.lang.String getDisplayName()
returns the name of the testing algorithm
-
getToolTipText
java.lang.String getToolTipText()
returns a string that is displayed as tooltip on the "perform test" button in the experimenter
-
assign
void assign(Tester tester)
retrieves all the settings from the given Tester- Parameters:
tester
- the Tester to get the settings from
-
setResultMatrix
void setResultMatrix(ResultMatrix matrix)
Sets the matrix to use to produce the output.- Parameters:
matrix
- the instance to use to produce the output- See Also:
ResultMatrix
-
getResultMatrix
ResultMatrix getResultMatrix()
Gets the instance that produces the output.- Returns:
- the instance to produce the output
-
setShowStdDevs
void setShowStdDevs(boolean s)
Set whether standard deviations are displayed or not.- Parameters:
s
- true if standard deviations are to be displayed
-
getShowStdDevs
boolean getShowStdDevs()
Returns true if standard deviations have been requested.- Returns:
- true if standard deviations are to be displayed.
-
getNumDatasets
int getNumDatasets()
Gets the number of datasets in the resultsets- Returns:
- the number of datasets in the resultsets
-
getNumResultsets
int getNumResultsets()
Gets the number of resultsets in the data.- Returns:
- the number of resultsets in the data
-
getResultsetName
java.lang.String getResultsetName(int index)
Gets a string descriptive of the specified resultset.- Parameters:
index
- the index of the resultset- Returns:
- a descriptive string for the resultset
-
displayResultset
boolean displayResultset(int index)
Checks whether the resultset with the given index shall be displayed.- Parameters:
index
- the index of the resultset to check whether it shall be displayed- Returns:
- whether the specified resultset is displayed
-
calculateStatistics
PairedStats calculateStatistics(Instance datasetSpecifier, int resultset1Index, int resultset2Index, int comparisonColumn) throws java.lang.Exception
Computes a paired t-test comparison for a specified dataset between two resultsets.- Parameters:
datasetSpecifier
- the dataset specifierresultset1Index
- the index of the first resultsetresultset2Index
- the index of the second resultsetcomparisonColumn
- the column containing values to compare- Returns:
- the results of the paired comparison
- Throws:
java.lang.Exception
- if an error occurs
-
resultsetKey
java.lang.String resultsetKey()
Creates a key that maps resultset numbers to their descriptions.- Returns:
- a value of type 'String'
-
header
java.lang.String header(int comparisonColumn)
Creates a "header" string describing the current resultsets.- Parameters:
comparisonColumn
- a value of type 'int'- Returns:
- a value of type 'String'
-
multiResultsetWins
int[][] multiResultsetWins(int comparisonColumn, int[][] nonSigWin) throws java.lang.Exception
Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other.- Parameters:
comparisonColumn
- the index of the comparison column- Returns:
- a 2d array where element [i][j] is the number of times resultset j performed significantly better than resultset i.
- Throws:
java.lang.Exception
- if an error occurs
-
multiResultsetSummary
java.lang.String multiResultsetSummary(int comparisonColumn) throws java.lang.Exception
Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other. The results are summarized in a table.- Parameters:
comparisonColumn
- the index of the comparison column- Returns:
- the results in a string
- Throws:
java.lang.Exception
- if an error occurs
-
multiResultsetRanking
java.lang.String multiResultsetRanking(int comparisonColumn) throws java.lang.Exception
- Throws:
java.lang.Exception
-
multiResultsetFull
java.lang.String multiResultsetFull(int baseResultset, int comparisonColumn) throws java.lang.Exception
Creates a comparison table where a base resultset is compared to the other resultsets. Results are presented for every dataset.- Parameters:
baseResultset
- the index of the base resultsetcomparisonColumn
- the index of the column to compare over- Returns:
- the comparison table string
- Throws:
java.lang.Exception
- if an error occurs
-
getResultsetKeyColumns
Range getResultsetKeyColumns()
Get the value of ResultsetKeyColumns.- Returns:
- Value of ResultsetKeyColumns.
-
setResultsetKeyColumns
void setResultsetKeyColumns(Range newResultsetKeyColumns)
Set the value of ResultsetKeyColumns.- Parameters:
newResultsetKeyColumns
- Value to assign to ResultsetKeyColumns.
-
getDisplayedResultsets
int[] getDisplayedResultsets()
Gets the indices of the the datasets that are displayed (ifnull
then all are displayed). The base is always displayed.- Returns:
- the indices of the datasets to display
-
setDisplayedResultsets
void setDisplayedResultsets(int[] cols)
Sets the indicies of the datasets to display (null
means all). The base is always displayed.- Parameters:
cols
- the indices of the datasets to display
-
getSignificanceLevel
double getSignificanceLevel()
Get the value of SignificanceLevel.- Returns:
- Value of SignificanceLevel.
-
setSignificanceLevel
void setSignificanceLevel(double newSignificanceLevel)
Set the value of SignificanceLevel.- Parameters:
newSignificanceLevel
- Value to assign to SignificanceLevel.
-
getDatasetKeyColumns
Range getDatasetKeyColumns()
Get the value of DatasetKeyColumns.- Returns:
- Value of DatasetKeyColumns.
-
setDatasetKeyColumns
void setDatasetKeyColumns(Range newDatasetKeyColumns)
Set the value of DatasetKeyColumns.- Parameters:
newDatasetKeyColumns
- Value to assign to DatasetKeyColumns.
-
getRunColumn
int getRunColumn()
Get the value of RunColumn.- Returns:
- Value of RunColumn.
-
setRunColumn
void setRunColumn(int newRunColumn)
Set the value of RunColumn.- Parameters:
newRunColumn
- Value to assign to RunColumn.
-
getFoldColumn
int getFoldColumn()
Get the value of FoldColumn.- Returns:
- Value of FoldColumn.
-
setFoldColumn
void setFoldColumn(int newFoldColumn)
Set the value of FoldColumn.- Parameters:
newFoldColumn
- Value to assign to FoldColumn.
-
getSortColumnName
java.lang.String getSortColumnName()
Returns the name of the column to sort on.- Returns:
- the name of the column to sort on.
-
getSortColumn
int getSortColumn()
Returns the column to sort on, -1 means the default sorting.- Returns:
- the column to sort on.
-
setSortColumn
void setSortColumn(int newSortColumn)
Set the column to sort on, -1 means the default sorting.- Parameters:
newSortColumn
- the new sort column.
-
getInstances
Instances getInstances()
Get the value of Instances.- Returns:
- Value of Instances.
-
setInstances
void setInstances(Instances newInstances)
Set the value of Instances.- Parameters:
newInstances
- Value to assign to Instances.
-
-