|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.BVDecompose
public class BVDecompose
Class for performing a Bias-Variance decomposition on any classifier using the method specified in:
Ron Kohavi, David H. Wolpert: Bias Plus Variance Decomposition for Zero-One Loss Functions. In: Machine Learning: Proceedings of the Thirteenth International Conference, 275-283, 1996.
@inproceedings{Kohavi1996,
author = {Ron Kohavi and David H. Wolpert},
booktitle = {Machine Learning: Proceedings of the Thirteenth International Conference},
editor = {Lorenza Saitta},
pages = {275-283},
publisher = {Morgan Kaufmann},
title = {Bias Plus Variance Decomposition for Zero-One Loss Functions},
year = {1996},
PS = {http://robotics.stanford.edu/\~ronnyk/biasVar.ps}
}
Valid options are:
-c <class index> The index of the class attribute. (default last)
-t <name of arff file> The name of the arff file used for the decomposition.
-T <training pool size> The number of instances placed in the training pool. The remainder will be used for testing. (default 100)
-s <seed> The random number seed used.
-x <num> The number of training repetitions used. (default 50)
-D Turn on debugging output.
-W <classifier class name> Full class name of the learner used in the decomposition. eg: weka.classifiers.bayes.NaiveBayes
Options specific to learner weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are passed to the designated sub-learner.
| Constructor Summary | |
|---|---|
BVDecompose()
|
|
| Method Summary | |
|---|---|
void |
decompose()
Carry out the bias-variance decomposition |
double |
getBias()
Get the calculated bias squared |
Classifier |
getClassifier()
Gets the name of the classifier being analysed |
int |
getClassIndex()
Get the index (starting from 1) of the attribute used as the class. |
java.lang.String |
getDataFileName()
Get the name of the data file used for the decomposition |
boolean |
getDebug()
Gets whether debugging is turned on |
double |
getError()
Get the calculated error rate |
java.lang.String[] |
getOptions()
Gets the current settings of the CheckClassifier. |
java.lang.String |
getRevision()
Returns the revision string. |
int |
getSeed()
Gets the random number seed |
double |
getSigma()
Get the calculated sigma squared |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
int |
getTrainIterations()
Gets the maximum number of boost iterations |
int |
getTrainPoolSize()
Get the number of instances in the training pool. |
double |
getVariance()
Get the calculated variance |
java.lang.String |
globalInfo()
Returns a string describing this object |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] args)
Test method for this class |
void |
setClassifier(Classifier newClassifier)
Set the classifiers being analysed |
void |
setClassIndex(int classIndex)
Sets index of attribute to discretize on |
void |
setDataFileName(java.lang.String dataFileName)
Sets the name of the data file used for the decomposition |
void |
setDebug(boolean debug)
Sets debugging mode |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSeed(int seed)
Sets the random number seed |
void |
setTrainIterations(int trainIterations)
Sets the maximum number of boost iterations |
void |
setTrainPoolSize(int numTrain)
Set the number of instances in the training pool. |
java.lang.String |
toString()
Returns description of the bias-variance decomposition results. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BVDecompose()
| Method Detail |
|---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-c <class index> The index of the class attribute. (default last)
-t <name of arff file> The name of the arff file used for the decomposition.
-T <training pool size> The number of instances placed in the training pool. The remainder will be used for testing. (default 100)
-s <seed> The random number seed used.
-x <num> The number of training repetitions used. (default 50)
-D Turn on debugging output.
-W <classifier class name> Full class name of the learner used in the decomposition. eg: weka.classifiers.bayes.NaiveBayes
Options specific to learner weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are passed to the designated sub-learner.
setOptions in interface OptionHandleroptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic int getTrainPoolSize()
public void setTrainPoolSize(int numTrain)
numTrain - number of instances in the training pool.public void setClassifier(Classifier newClassifier)
newClassifier - the Classifier to use.public Classifier getClassifier()
public void setDebug(boolean debug)
debug - true if debug output should be printedpublic boolean getDebug()
public void setSeed(int seed)
seed - the random number seedpublic int getSeed()
public void setTrainIterations(int trainIterations)
trainIterations - the number of boost iterationspublic int getTrainIterations()
public void setDataFileName(java.lang.String dataFileName)
dataFileName - the data file to usepublic java.lang.String getDataFileName()
public int getClassIndex()
public void setClassIndex(int classIndex)
classIndex - the index (starting from 1) of the class attributepublic double getBias()
public double getVariance()
public double getSigma()
public double getError()
public void decompose()
throws java.lang.Exception
java.lang.Exception - if the decomposition couldn't be carried outpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlerpublic static void main(java.lang.String[] args)
args - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||