Package weka.classifiers.mi

# Class MIBoost

java.lang.Object
weka.classifiers.Classifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.mi.MIBoost

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `CapabilitiesHandler`, `MultiInstanceCapabilitiesHandler`, `OptionHandler`, `RevisionHandler`, `TechnicalInformationHandler`

public class MIBoost extends SingleClassifierEnhancer implements OptionHandler, MultiInstanceCapabilitiesHandler, TechnicalInformationHandler
MI AdaBoost method, considers 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.
For more information about Adaboost, see:
Yoav Freund, Robert E. Schapire: Experiments with a new boosting algorithm. In: Thirteenth International Conference on Machine Learning, San Francisco, 148-156, 1996.

BibTeX:

     @inproceedings{Freund1996,
        address = {San Francisco},
        author = {Yoav Freund and Robert E. Schapire},
        booktitle = {Thirteenth International Conference on Machine Learning},
        pages = {148-156},
        publisher = {Morgan Kaufmann},
        title = {Experiments with a new boosting algorithm},
        year = {1996}
     }

Valid options are:

     -D
      Turn on debugging output.

     -B <num>
      The number of bins in discretization
      (default 0, no discretization)

     -R <num>
      Maximum number of boost iterations.
      (default 10)

     -W <class name>
      Full name of classifier to boost.
      eg: weka.classifiers.bayes.NaiveBayes

     -D
      If set, classifier is run in debug mode and
      may output additional info to the console

Version:
  $Revision: 9144 $
Author:
  Eibe Frank (eibe@cs.waikato.ac.nz), Xin Xu (xx5@cs.waikato.ac.nz)
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`MIBoost()`

## Method Summary

Modifier and Type
Method
Description
`void`
`buildClassifier(Instances exps)`
Builds the classifier
`String`
`discretizeBinTipText()`
Returns the tip text for this property
`double[]`
`distributionForInstance(Instance exmp)`
Computes the distribution for a given exemplar
`Capabilities`
`getCapabilities()`
Returns default capabilities of the classifier.
`int`
`getDiscretizeBin()`
Get the number of bins in discretization
`int`
`getMaxIterations()`
Get the maximum number of boost iterations
`Capabilities`
`getMultiInstanceCapabilities()`
Returns the capabilities of this multi-instance classifier for the relational data.
`String[]`
`getOptions()`
Gets the current settings of the classifier.
`String`
`getRevision()`
Returns the revision string.
`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.
`String`
`globalInfo()`
Returns a string describing this filter
`Enumeration`
`listOptions()`
Returns an enumeration describing the available options
`static void`
`main(String[] argv)`
Main method for testing this class.
`String`
`maxIterationsTipText()`
Returns the tip text for this property
`void`
`setDiscretizeBin(int bin)`
Set the number of bins in discretization
`void`
`setMaxIterations(int maxIterations)`
Set the maximum number of boost iterations
`void`
`setOptions(String[] options)`
Parses a given list of options.
`String`
`toString()`
Gets a string describing the classifier.

### Methods inherited from class weka.classifiers.SingleClassifierEnhancer

`classifierTipText, getClassifier, setClassifier`

### Methods inherited from class weka.classifiers.Classifier

`classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### MIBoost

public MIBoost()

## Method Details

### globalInfo

public String globalInfo()
Returns a string describing this filter

Returns:
  a description of the filter suitable for displaying in the explorer/experimenter gui

### getTechnicalInformation

public 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.

Specified by:
  `getTechnicalInformation` in interface `TechnicalInformationHandler`
Returns:
  the technical information about this class

### listOptions

public Enumeration listOptions()
Returns an enumeration describing the available options

Specified by:
  `listOptions` in interface `OptionHandler`
Overrides:
  `listOptions` in class `SingleClassifierEnhancer`
Returns:
  an enumeration of all the available options

### setOptions

public void setOptions(String[] options) throws Exception
Parses a given list of options.

Valid options are:

     -D
      Turn on debugging output.

     -B <num>
      The number of bins in discretization
      (default 0, no discretization)

     -R <num>
      Maximum number of boost iterations.
      (default 10)

     -W <class name>
      Full name of classifier to boost.
      eg: weka.classifiers.bayes.NaiveBayes

     -D
      If set, classifier is run in debug mode and
      may output additional info to the console

Specified by:
  `setOptions` in interface `OptionHandler`
Overrides:
  `setOptions` in class `SingleClassifierEnhancer`
Parameters:
  `options` - the list of options as an array of strings
Throws:
  `Exception` - if an option is not supported

### getOptions

public String[] getOptions()
Gets the current settings of the classifier.

Specified by:
  `getOptions` in interface `OptionHandler`
Overrides:
  `getOptions` in class `SingleClassifierEnhancer`
Returns:
  an array of strings suitable for passing to setOptions

### maxIterationsTipText

public String maxIterationsTipText()
Returns the tip text for this property

Returns:
  tip text for this property suitable for displaying in the explorer/experimenter gui

### setMaxIterations

public void setMaxIterations(int maxIterations)
Set the maximum number of boost iterations

Parameters:
  `maxIterations` - the maximum number of boost iterations

### getMaxIterations

public int getMaxIterations()
Get the maximum number of boost iterations

Returns:
  the maximum number of boost iterations

### discretizeBinTipText

public String discretizeBinTipText()
Returns the tip text for this property

Returns:
  tip text for this property suitable for displaying in the explorer/experimenter gui

### setDiscretizeBin

public void setDiscretizeBin(int bin)
Set the number of bins in discretization

Parameters:
  `bin` - the number of bins in discretization

### getDiscretizeBin

public int getDiscretizeBin()
Get the number of bins in discretization

Returns:
  the number of bins in discretization

### getCapabilities

public Capabilities getCapabilities()
Returns default capabilities of the classifier.

Specified by:
  `getCapabilities` in interface `CapabilitiesHandler`
Overrides:
  `getCapabilities` in class `SingleClassifierEnhancer`
Returns:
  the capabilities of this classifier
See Also:
  - `Capabilities`

### getMultiInstanceCapabilities

public Capabilities getMultiInstanceCapabilities()
Returns the capabilities of this multi-instance classifier for the relational data.

Specified by:
  `getMultiInstanceCapabilities` in interface `MultiInstanceCapabilitiesHandler`
Returns:
  the capabilities of this object
See Also:
  - `Capabilities`

### buildClassifier

public void buildClassifier(Instances exps) throws Exception
Builds the classifier

Specified by:
  `buildClassifier` in class `Classifier`
Parameters:
  `exps` - the training data to be used for generating the boosted classifier.
Throws:
  `Exception` - if the classifier could not be built successfully

### distributionForInstance

public double[] distributionForInstance(Instance exmp) throws Exception
Computes the distribution for a given exemplar

Overrides:
  `distributionForInstance` in class `Classifier`
Parameters:
  `exmp` - the exemplar for which distribution is computed
Returns:
  the classification
Throws:
  `Exception` - if the distribution can't be computed successfully

### toString

public String toString()
Gets a string describing the classifier.

Overrides:
  `toString` in class `Object`
Returns:
  a string describing the classifer built.

### getRevision

public String getRevision()
Returns the revision string.

Specified by:
  `getRevision` in interface `RevisionHandler`
Overrides:
  `getRevision` in class `Classifier`
Returns:
  the revision

### main

public static void main(String[] argv)
Main method for testing this class.

Parameters:
  `argv` - should contain the command line arguments to the scheme (see Evaluation)