All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.BVDecompose

java.lang.Object
   |
   +----weka.classifiers.BVDecompose

public class BVDecompose
extends Object
implements OptionHandler
Class for performing a Bias-Variance decomposition on any classifier using the method specified in:

R. Kohavi & D. Wolpert (1996), Bias plus variance decomposition for zero-one loss functions, in Proc. of the Thirteenth International Machine Learning Conference (ICML96) download postscript.

Valid options are:

-D
Turn on debugging output.

-W classname
Specify the full class name of a learner to perform the decomposition on (required).

-t filename
Set the arff file to use for the decomposition (required).

-T num
Specify the number of instances in the training pool (default 100).

-c num
Specify the index of the class attribute (default last).

-x num
Set the number of train iterations (default 50).

-s num
Set the seed for the dataset randomisation (default 1).

Options after -- are passed to the designated sub-learner.

Version:
$Revision: 1.4 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz)

Constructor Index

 o BVDecompose()

Method Index

 o decompose()
Carry out the bias-variance decomposition
 o getBias()
Get the calculated bias squared
 o getClassifier()
Gets the name of the classifier being analysed
 o getClassIndex()
Get the index (starting from 1) of the attribute used as the class.
 o getDataFileName()
Get the name of the data file used for the decomposition
 o getDebug()
Gets whether debugging is turned on
 o getError()
Get the calculated error rate
 o getOptions()
Gets the current settings of the CheckClassifier.
 o getSeed()
Gets the random number seed
 o getSigma()
Get the calculated sigma squared
 o getTrainIterations()
Gets the maximum number of boost iterations
 o getTrainPoolSize()
Get the number of instances in the training pool.
 o getVariance()
Get the calculated variance
 o listOptions()
Returns an enumeration describing the available options
 o main(String[])
Test method for this class
 o setClassifier(Classifier)
Set the classifiers being analysed
 o setClassIndex(int)
Sets index of attribute to discretize on
 o setDataFileName(String)
Sets the maximum number of boost iterations
 o setDebug(boolean)
Sets debugging mode
 o setOptions(String[])
Parses a given list of options.
 o setSeed(int)
Sets the random number seed
 o setTrainIterations(int)
Sets the maximum number of boost iterations
 o setTrainPoolSize(int)
Set the number of instances in the training pool.
 o toString()
Returns description of the bias-variance decomposition results.

Constructors

 o BVDecompose
 public BVDecompose()

Methods

 o listOptions
 public Enumeration listOptions()
Returns an enumeration describing the available options

Returns:
an enumeration of all the available options
 o setOptions
 public void setOptions(String options[]) throws Exception
Parses a given list of options. Valid options are:

-D
Turn on debugging output.

-W classname
Specify the full class name of a learner to perform the decomposition on (required).

-t filename
Set the arff file to use for the decomposition (required).

-T num
Specify the number of instances in the training pool (default 100).

-c num
Specify the index of the class attribute (default last).

-x num
Set the number of train iterations (default 50).

-s num
Set the seed for the dataset randomisation (default 1).

Options after -- are passed to the designated sub-learner.

Parameters:
options - the list of options as an array of strings
Throws: Exception
if an option is not supported
 o getOptions
 public String[] getOptions()
Gets the current settings of the CheckClassifier.

Returns:
an array of strings suitable for passing to setOptions
 o getTrainPoolSize
 public int getTrainPoolSize()
Get the number of instances in the training pool.

Returns:
number of instances in the training pool.
 o setTrainPoolSize
 public void setTrainPoolSize(int numTrain)
Set the number of instances in the training pool.

Parameters:
numTrain - number of instances in the training pool.
 o setClassifier
 public void setClassifier(Classifier newClassifier)
Set the classifiers being analysed

Parameters:
newClassifier - the Classifier to use.
 o getClassifier
 public Classifier getClassifier()
Gets the name of the classifier being analysed

Returns:
the classifier being analysed.
 o setDebug
 public void setDebug(boolean debug)
Sets debugging mode

Parameters:
debug - true if debug output should be printed
 o getDebug
 public boolean getDebug()
Gets whether debugging is turned on

Returns:
true if debugging output is on
 o setSeed
 public void setSeed(int seed)
Sets the random number seed

 o getSeed
 public int getSeed()
Gets the random number seed

Returns:
the random number seed
 o setTrainIterations
 public void setTrainIterations(int trainIterations)
Sets the maximum number of boost iterations

 o getTrainIterations
 public int getTrainIterations()
Gets the maximum number of boost iterations

Returns:
the maximum number of boost iterations
 o setDataFileName
 public void setDataFileName(String dataFileName)
Sets the maximum number of boost iterations

 o getDataFileName
 public String getDataFileName()
Get the name of the data file used for the decomposition

Returns:
the name of the data file
 o getClassIndex
 public int getClassIndex()
Get the index (starting from 1) of the attribute used as the class.

Returns:
the index of the class attribute
 o setClassIndex
 public void setClassIndex(int classIndex)
Sets index of attribute to discretize on

Parameters:
index - the index (starting from 1) of the class attribute
 o getBias
 public double getBias()
Get the calculated bias squared

Returns:
the bias squared
 o getVariance
 public double getVariance()
Get the calculated variance

Returns:
the variance
 o getSigma
 public double getSigma()
Get the calculated sigma squared

Returns:
the sigma squared
 o getError
 public double getError()
Get the calculated error rate

Returns:
the error rate
 o decompose
 public void decompose() throws Exception
Carry out the bias-variance decomposition

Throws: Exception
if the decomposition couldn't be carried out
 o toString
 public String toString()
Returns description of the bias-variance decomposition results.

Returns:
the bias-variance decomposition results as a string
Overrides:
toString in class Object
 o main
 public static void main(String args[])
Test method for this class

Parameters:
args - the command line arguments

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home