|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.MultipleClassifiersCombiner
weka.classifiers.RandomizableMultipleClassifiersCombiner
weka.classifiers.meta.MultiScheme
Class for selecting a classifier from among several using cross validation on the training data or the performance on the training data. Performance is measured based on percent correct (classification) or mean-squared error (regression).
Valid options from the command line are:
-D
Turn on debugging output.
-S seed
Random number seed (default 1).
-B classifierstring
Classifierstring should contain the full class name of a scheme
included for selection followed by options to the classifier
(required, option should be used once for each classifier).
-X num_folds
Use cross validation error as the basis for classifier selection.
(default 0, is to use error on the training data instead)
| Constructor Summary | |
MultiScheme()
|
|
| Method Summary | |
void |
buildClassifier(Instances data)
Buildclassifier selects a classifier from the set of classifiers by minimising error on the training data. |
java.lang.String |
classifiersTipText()
Returns the tip text for this property |
java.lang.String |
debugTipText()
Returns the tip text for this property |
double[] |
distributionForInstance(Instance instance)
Returns class probabilities. |
Classifier |
getClassifier(int index)
Gets a single classifier from the set of available classifiers. |
Classifier[] |
getClassifiers()
Gets the list of possible classifers to choose from. |
boolean |
getDebug()
Get whether debugging is turned on |
int |
getNumFolds()
Gets the number of folds for cross-validation. |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
int |
getSeed()
Gets the random number seed. |
java.lang.String |
globalInfo()
Returns a string describing classifier |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
numFoldsTipText()
Returns the tip text for this property |
java.lang.String |
seedTipText()
Returns the tip text for this property |
void |
setClassifiers(Classifier[] classifiers)
Sets the list of possible classifers to choose from. |
void |
setDebug(boolean debug)
Set debugging mode |
void |
setNumFolds(int numFolds)
Sets the number of folds for cross-validation. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSeed(int seed)
Sets the seed for random number generation. |
java.lang.String |
toString()
Output a representation of this classifier |
| Methods inherited from class weka.classifiers.Classifier |
classifyInstance, forName, makeCopies |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MultiScheme()
| Method Detail |
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class RandomizableMultipleClassifiersCombiner
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-D
Turn on debugging output.
-S seed
Random number seed (default 1).
-B classifierstring
Classifierstring should contain the full class name of a scheme
included for selection followed by options to the classifier
(required, option should be used once for each classifier).
-X num_folds
Use cross validation error as the basis for classifier selection.
(default 0, is to use error on the training data instead)
setOptions in interface OptionHandlersetOptions in class RandomizableMultipleClassifiersCombineroptions - 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 OptionHandlergetOptions in class RandomizableMultipleClassifiersCombinerpublic java.lang.String classifiersTipText()
classifiersTipText in class MultipleClassifiersCombinerpublic void setClassifiers(Classifier[] classifiers)
setClassifiers in class MultipleClassifiersCombinerclassifiers - an array of classifiers with all options set.public Classifier[] getClassifiers()
getClassifiers in class MultipleClassifiersCombinerpublic Classifier getClassifier(int index)
getClassifier in class MultipleClassifiersCombinerindex - the index of the classifier wanted
public java.lang.String seedTipText()
seedTipText in class RandomizableMultipleClassifiersCombinerpublic void setSeed(int seed)
setSeed in interface RandomizablesetSeed in class RandomizableMultipleClassifiersCombinerseed - the random number seedpublic int getSeed()
getSeed in interface RandomizablegetSeed in class RandomizableMultipleClassifiersCombinerpublic java.lang.String numFoldsTipText()
public int getNumFolds()
public void setNumFolds(int numFolds)
numFolds - the number of folds for cross-validationpublic java.lang.String debugTipText()
debugTipText in class Classifierpublic void setDebug(boolean debug)
setDebug in class Classifierdebug - true if debug output should be printedpublic boolean getDebug()
getDebug in class Classifier
public void buildClassifier(Instances data)
throws java.lang.Exception
buildClassifier in class Classifierdata - the training data to be used for generating the
boosted classifier.
java.lang.Exception - if the classifier could not be built successfully
public double[] distributionForInstance(Instance instance)
throws java.lang.Exception
distributionForInstance in class Classifierinstance - the instance to be classified
java.lang.Exception - if instance could not be classified
successfullypublic java.lang.String toString()
public static void main(java.lang.String[] argv)
argv - should contain the following arguments:
-t training file [-T test file] [-c class index]
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||