|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--weka.classifiers.Classifier
|
+--weka.classifiers.DistributionClassifier
|
+--weka.classifiers.MultiClassClassifier
Class for handling multi-class datasets with 2-class distribution classifiers.
Valid options are:
-E num
Sets the error-correction mode. Valid values are 0 (no correction),
1 (random codes), and 2 (exhaustive code). (default 0)
-R num
Sets the multiplier when using random codes. (default 2.0)
-W classname
Specify the full class name of a classifier as the basis for
the multi-class classifier (required).
| Field Summary | |
static int |
ERROR_EXHAUSTIVE
|
static int |
ERROR_NONE
The error correction modes |
static int |
ERROR_RANDOM
|
static Tag[] |
TAGS_ERROR
|
| Constructor Summary | |
MultiClassClassifier()
|
|
| Method Summary | |
void |
buildClassifier(Instances insts)
Builds the classifiers. |
java.lang.String |
distributionClassifierTipText()
|
double[] |
distributionForInstance(Instance inst)
Returns the distribution for an instance. |
java.lang.String |
errorCorrectionModeTipText()
|
DistributionClassifier |
getDistributionClassifier()
Get the classifier used as the classifier |
SelectedTag |
getErrorCorrectionMode()
Gets the error correction mode used. |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
double |
getRandomWidthFactor()
Gets the multiplier when generating random codes. |
java.lang.String |
globalInfo()
|
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 |
randomWidthFactorTipText()
|
void |
setDistributionClassifier(DistributionClassifier newClassifier)
Set the base classifier. |
void |
setErrorCorrectionMode(SelectedTag newMethod)
Sets the error correction mode used. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setRandomWidthFactor(double newRandomWidthFactor)
Sets the multiplier when generating random codes. |
java.lang.String |
toString()
Prints the classifiers. |
| Methods inherited from class weka.classifiers.DistributionClassifier |
classifyInstance |
| Methods inherited from class weka.classifiers.Classifier |
forName, makeCopies |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ERROR_NONE
public static final int ERROR_RANDOM
public static final int ERROR_EXHAUSTIVE
public static final Tag[] TAGS_ERROR
| Constructor Detail |
public MultiClassClassifier()
| Method Detail |
public void buildClassifier(Instances insts)
throws java.lang.Exception
buildClassifier in class Classifierinsts - the training data.java.lang.Exception - if a classifier can't be built
public double[] distributionForInstance(Instance inst)
throws java.lang.Exception
distributionForInstance in class DistributionClassifierjava.lang.Exception - if the distribution can't be computed successfullypublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-E num
Sets the error-correction mode. Valid values are 0 (no correction),
1 (random codes), and 2 (exhaustive code). (default 0)
-R num
Sets the multiplier when using random codes. (default 2.0)
-W classname
Specify the full class name of a learner as the basis for
the multiclassclassifier (required).
setOptions in interface OptionHandleroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic java.lang.String globalInfo()
public java.lang.String randomWidthFactorTipText()
public double getRandomWidthFactor()
public void setRandomWidthFactor(double newRandomWidthFactor)
newRandomWidthFactor - the new width multiplierpublic java.lang.String errorCorrectionModeTipText()
public SelectedTag getErrorCorrectionMode()
public void setErrorCorrectionMode(SelectedTag newMethod)
newMethod - the new error correction mode.public java.lang.String distributionClassifierTipText()
public void setDistributionClassifier(DistributionClassifier newClassifier)
newClassifier - the Classifier to use.public DistributionClassifier getDistributionClassifier()
public static void main(java.lang.String[] argv)
argv - the options
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||