All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.experiment.PairedTTester
java.lang.Object
|
+----weka.experiment.PairedTTester
- public class PairedTTester
- extends Object
- implements OptionHandler
Calculates T-Test statistics on data stored in a set of instances.
Valid options from the command-line are:
-D num
The column number containing the dataset name.
(default last)
-R num
The column number containing the run number.
(default last)
-S num
The significance level for T-Tests.
(default 0.05)
-R num,num2...
The column numbers that uniquely specify one result generator (eg:
scheme name plus options).
(default last)
- Version:
- $Revision: 1.4 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
-
PairedTTester()
-
-
calculateStatistics(int, int, int, int)
- Computes a paired t-test comparison for a specified dataset between
two resultsets.
-
getDatasetColumn()
- Get the value of DatasetColumn.
-
getInstances()
- Get the value of Instances.
-
getNumDatasets()
- Gets the number of datasets in the resultsets
-
getNumResultsets()
- Gets the number of resultsets in the data.
-
getOptions()
- Gets current settings of the PairedTTester.
-
getResultsetKeyColumns()
- Get the value of ResultsetKeyColumns.
-
getResultsetName(int)
- Gets a string descriptive of the specified resultset.
-
getRunColumn()
- Get the value of RunColumn.
-
getSignificanceLevel()
- Get the value of SignificanceLevel.
-
header(int)
- Creates a "header" string describing the current resultsets.
-
listOptions()
- Lists options understood by this object.
-
main(String[])
- Test the class from the command line.
-
multiResultsetFull(int, int)
- Creates a comparison table where a base resultset is compared to the
other resultsets.
-
multiResultsetRanking(int)
-
-
multiResultsetSummary(int)
- Carries out a comparison between all resultsets, counting the number
of datsets where one resultset outperforms the other.
-
multiResultsetWins(int)
- Carries out a comparison between all resultsets, counting the number
of datsets where one resultset outperforms the other.
-
resultsetKey()
- Creates a key that maps resultset numbers to their descriptions.
-
setDatasetColumn(int)
- Set the value of DatasetColumn.
-
setInstances(Instances)
- Set the value of Instances.
-
setOptions(String[])
- Parses a given list of options.
-
setResultsetKeyColumns(Range)
- Set the value of ResultsetKeyColumns.
-
setRunColumn(int)
- Set the value of RunColumn.
-
setSignificanceLevel(double)
- Set the value of SignificanceLevel.
PairedTTester
public PairedTTester()
getNumDatasets
public int getNumDatasets()
- Gets the number of datasets in the resultsets
- Returns:
- the number of datasets in the resultsets
getNumResultsets
public int getNumResultsets()
- Gets the number of resultsets in the data.
- Returns:
- the number of resultsets in the data
getResultsetName
public 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
calculateStatistics
public PairedStats calculateStatistics(int datasetIndex,
int resultset1Index,
int resultset2Index,
int comparisonColumn) throws Exception
- Computes a paired t-test comparison for a specified dataset between
two resultsets.
- Parameters:
- datasetIndex - the index of the dataset
- resultset1Index - the index of the first resultset
- resultset2Index - the index of the second resultset
- comparisonColumn - the column containing values to compare
- Returns:
- the results of the paired comparison
- Throws: Exception
- if an error occurs
resultsetKey
public String resultsetKey()
- Creates a key that maps resultset numbers to their descriptions.
- Returns:
- a value of type 'String'
header
public 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
public int[][] multiResultsetWins(int comparisonColumn) throws 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: Exception
- if an error occurs
multiResultsetSummary
public String multiResultsetSummary(int comparisonColumn) throws 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: Exception
- if an error occurs
multiResultsetRanking
public String multiResultsetRanking(int comparisonColumn) throws Exception
multiResultsetFull
public String multiResultsetFull(int baseResultset,
int comparisonColumn) throws 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 resultset
- comparisonColumn - the index of the column to compare over
- Returns:
- the comparison table string
- Throws: Exception
- if an error occurs
listOptions
public Enumeration listOptions()
- Lists options understood by this object.
- Returns:
- an enumeration of Options.
setOptions
public void setOptions(String options[]) throws Exception
- Parses a given list of options. Valid options are:
-D num
The column number containing the dataset name.
(default last)
-R num
The column number containing the run number.
(default last)
-S num
The significance level for T-Tests.
(default 0.05)
-R num,num2...
The column numbers that uniquely specify one result generator (eg:
scheme name plus options).
(default last)
- Parameters:
- options - an array containing options to set.
- Throws: Exception
- if invalid options are given
getOptions
public String[] getOptions()
- Gets current settings of the PairedTTester.
- Returns:
- an array of strings containing current options.
getResultsetKeyColumns
public Range getResultsetKeyColumns()
- Get the value of ResultsetKeyColumns.
- Returns:
- Value of ResultsetKeyColumns.
setResultsetKeyColumns
public void setResultsetKeyColumns(Range newResultsetKeyColumns)
- Set the value of ResultsetKeyColumns.
- Parameters:
- newResultsetKeyColumns - Value to assign to ResultsetKeyColumns.
getSignificanceLevel
public double getSignificanceLevel()
- Get the value of SignificanceLevel.
- Returns:
- Value of SignificanceLevel.
setSignificanceLevel
public void setSignificanceLevel(double newSignificanceLevel)
- Set the value of SignificanceLevel.
- Parameters:
- newSignificanceLevel - Value to assign to SignificanceLevel.
getDatasetColumn
public int getDatasetColumn()
- Get the value of DatasetColumn.
- Returns:
- Value of DatasetColumn.
setDatasetColumn
public void setDatasetColumn(int newDatasetColumn)
- Set the value of DatasetColumn.
- Parameters:
- newDatasetColumn - Value to assign to DatasetColumn.
getRunColumn
public int getRunColumn()
- Get the value of RunColumn.
- Returns:
- Value of RunColumn.
setRunColumn
public void setRunColumn(int newRunColumn)
- Set the value of RunColumn.
- Parameters:
- newRunColumn - Value to assign to RunColumn.
getInstances
public Instances getInstances()
- Get the value of Instances.
- Returns:
- Value of Instances.
setInstances
public void setInstances(Instances newInstances)
- Set the value of Instances.
- Parameters:
- newInstances - Value to assign to Instances.
main
public static void main(String args[])
- Test the class from the command line.
- Parameters:
- args - contains options for the instance ttests
All Packages Class Hierarchy This Package Previous Next Index WEKA's home