|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--milk.classifiers.MIClassifier
|
+--milk.classifiers.MIWrapper
Weighted Wrapper method from Eibe Valid options are:
-D
Turn on debugging output.
-W classname
Specify the full class name of a classifier as the basis (required).
-P method index
Set which method to use in testing: 1.arithmatic average; 2.geometric average. (default: 1)
| Field Summary | |
protected weka.core.Instances |
m_Attributes
All attribute names |
protected weka.classifiers.Classifier |
m_Classifier
|
protected int |
m_ClassIndex
The index of the class attribute |
protected boolean |
m_Debug
Debugging output |
protected int |
m_IdIndex
|
protected int |
m_Method
|
protected int |
m_NumClasses
The number of the class labels |
| Constructor Summary | |
MIWrapper()
|
|
| Method Summary | |
void |
buildClassifier(Exemplars train)
Builds the classifier |
double[] |
distributionForExemplar(Exemplar exmp)
Computes the distribution for a given exemplar |
weka.classifiers.Classifier |
getClassifier()
Get the classifier used as the classifier |
boolean |
getDebug()
Gets whether debugging output will be printed. |
int |
getMethod()
Get the method used in testing. |
java.lang.String[] |
getOptions()
Gets the current settings of the 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. |
void |
setClassifier(weka.classifiers.Classifier newClassifier)
Set the base classifier. |
void |
setDebug(boolean debug)
Sets whether debugging output will be printed. |
void |
setMethod(int newMethod)
Set the method used in testing. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Gets a string describing the classifier. |
weka.core.Instances |
transform(Exemplars train)
transform the given exemplars to an Instances object. |
| Methods inherited from class milk.classifiers.MIClassifier |
classifyExemplar, forName, makeCopies |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int m_ClassIndex
protected int m_NumClasses
protected int m_IdIndex
protected boolean m_Debug
protected weka.core.Instances m_Attributes
protected weka.classifiers.Classifier m_Classifier
protected int m_Method
| Constructor Detail |
public MIWrapper()
| Method Detail |
public java.util.Enumeration listOptions()
listOptions in interface weka.core.OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-D
Turn on debugging output.
-W classname
Specify the full class name of a classifier as the basis (required).
-P method_index
Set which method to use in testing: 1.arithmatic average; 2.geometric average. (default: 1)
setOptions in interface weka.core.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 weka.core.OptionHandlerpublic void setDebug(boolean debug)
debug - true if debugging output should be printedpublic boolean getDebug()
public void setClassifier(weka.classifiers.Classifier newClassifier)
newClassifier - the Classifier to use.public weka.classifiers.Classifier getClassifier()
public void setMethod(int newMethod)
newMethod - the index of method to use.public int getMethod()
public weka.core.Instances transform(Exemplars train)
throws java.lang.Exception
MITransform
transform in interface MITransformjava.lang.Exception - if transformation is not successful
public void buildClassifier(Exemplars train)
throws java.lang.Exception
buildClassifier in class MIClassifiertrain - the training data to be used for generating the
boosted classifier.
java.lang.Exception - if the classifier could not be built successfully
public double[] distributionForExemplar(Exemplar exmp)
throws java.lang.Exception
distributionForExemplar in class MIClassifierexmp - the exemplar for which distribution is computed
java.lang.Exception - if the distribution can't be computed successfullypublic java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] argv)
argv - should contain the command line arguments to the
scheme (see Evaluation)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||