|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--milk.classifiers.MIClassifier
|
+--milk.classifiers.MIBoost
MI AdaBoost method, consider the geometric mean of posterior of instances inside a bag (arithmatic mean of log-posterior) and the expectation for a bag is taken inside the loss function. Exact derivation from Hastie et al. paper
| Field Summary | |
protected weka.core.Instances |
m_Attributes
All attribute names |
protected double[] |
m_Beta
Voting weights of models |
protected int[] |
m_Classes
Class labels for each bag |
protected weka.classifiers.Classifier |
m_Classifier
The model base classifier to use |
protected int |
m_ClassIndex
The index of the class attribute |
protected boolean |
m_Debug
Debugging output |
protected int |
m_DiscretizeBin
|
protected weka.filters.unsupervised.attribute.Discretize |
m_Filter
|
protected int |
m_IdIndex
|
protected int |
m_MaxIterations
|
protected weka.classifiers.Classifier[] |
m_Models
|
protected int |
m_NumClasses
The number of the class labels |
| Constructor Summary | |
MIBoost()
|
|
| Method Summary | |
void |
buildClassifier(Exemplars exps)
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 |
getDiscretizeBin()
Get the number of bins in discretization |
int |
getMaxIterations()
Get the maximum number of boost iterations |
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 classifier for boosting. |
void |
setDebug(boolean debug)
Sets whether debugging output will be printed. |
void |
setDiscretizeBin(int bin)
Set the number of bins in discretization |
void |
setMaxIterations(int maxIterations)
Set the maximum number of boost iterations |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Gets a string describing the classifier. |
| 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 weka.classifiers.Classifier[] m_Models
protected int m_NumClasses
protected int m_IdIndex
protected boolean m_Debug
protected int[] m_Classes
protected weka.core.Instances m_Attributes
protected weka.classifiers.Classifier m_Classifier
protected double[] m_Beta
protected int m_MaxIterations
protected int m_DiscretizeBin
protected weka.filters.unsupervised.attribute.Discretize m_Filter
| Constructor Detail |
public MIBoost()
| 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.
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 setMaxIterations(int maxIterations)
maxIterations - the maximum number of boost iterationspublic int getMaxIterations()
public void setDiscretizeBin(int bin)
bin - the number of bins in discretizationpublic int getDiscretizeBin()
public void buildClassifier(Exemplars exps)
throws java.lang.Exception
buildClassifier in class MIClassifierexps - set of exemplars serving as training data
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 | |||||||||