Package weka.classifiers.meta

# Class MultiClassClassifierUpdateable

java.lang.Object
weka.classifiers.AbstractClassifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.RandomizableSingleClassifierEnhancer
weka.classifiers.meta.MultiClassClassifier
weka.classifiers.meta.MultiClassClassifierUpdateable

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Classifier`, `UpdateableClassifier`, `BatchPredictor`, `CapabilitiesHandler`, `CapabilitiesIgnorer`, `CommandlineRunnable`, `OptionHandler`, `Randomizable`, `RevisionHandler`, `WeightedInstancesHandler`

public class MultiClassClassifierUpdateable extends MultiClassClassifier implements OptionHandler, UpdateableClassifier
A metaclassifier for handling multi-class datasets with 2-class classifiers. This classifier is also capable of applying error correcting output codes for increased accuracy. The base classifier must be an updateable classifier

Valid options are:

     -M <num>
      Sets the method to use. Valid values are 0 (1-against-all),
      1 (random codes), 2 (exhaustive code), and 3 (1-against-1). (default 0)

     -R <num>
      Sets the multiplier when using random codes. (default 2.0)

     -P
      Use pairwise coupling (only has an effect for 1-against1)

     -S <num>
      Random number seed.
      (default 1)

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

     -W
      Full name of base classifier.
      (default: weka.classifiers.functions.SGD)

Version:
  $Revision: 9248 $
Author:
  Eibe Frank (eibe@cs.waikato.ac.nz), Len Trigg (len@reeltwo.com), Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class weka.classifiers.meta.MultiClassClassifier

  `METHOD_1_AGAINST_1, METHOD_1_AGAINST_ALL, METHOD_ERROR_EXHAUSTIVE, METHOD_ERROR_RANDOM, TAGS_METHOD`

  ### Fields inherited from class weka.classifiers.AbstractClassifier

  `BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MultiClassClassifierUpdateable()`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `buildClassifier(Instances insts)`
  Builds the classifiers.
  `double[]`
  `distributionForInstance(Instance inst)`
  Returns the distribution for an instance.
  `String`
  `getRevision()`
  Returns the revision string.
  `String`
  `globalInfo()`
  `static void`
  `main(String[] argv)`
  Main method for testing this class.
  `void`
  `updateClassifier(Instance instance)`
  Updates the classifier with the given instance.

  ### Methods inherited from class weka.classifiers.meta.MultiClassClassifier

  `getCapabilities, getLogLossDecoding, getMethod, getOptions, getRandomWidthFactor, getUsePairwiseCoupling, individualPredictions, listOptions, logLossDecodingTipText, methodTipText, pairwiseCoupling, randomWidthFactorTipText, setLogLossDecoding, setMethod, setOptions, setRandomWidthFactor, setUsePairwiseCoupling, toString, usePairwiseCouplingTipText`

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

  `getSeed, seedTipText, setSeed`

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

  `classifierTipText, getClassifier, postExecution, preExecution, setClassifier`

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

  `batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces`

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

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

  ### Methods inherited from interface weka.core.OptionHandler

  `getOptions, listOptions, setOptions`

- ## Constructor Details

  - ### MultiClassClassifierUpdateable

    public MultiClassClassifierUpdateable()
    Constructor

- ## Method Details

  - ### globalInfo

    public String globalInfo()
    Overrides:
      `globalInfo` in class `MultiClassClassifier`
    Returns:
      a description of the classifier suitable for displaying in the explorer/experimenter gui

  - ### buildClassifier

    public void buildClassifier(Instances insts) throws Exception
    Description copied from class: `MultiClassClassifier`
    Builds the classifiers.
    Specified by:
      `buildClassifier` in interface `Classifier`
    Overrides:
      `buildClassifier` in class `MultiClassClassifier`
    Parameters:
      `insts` - the training data.
    Throws:
      `Exception` - if a classifier can't be built

  - ### updateClassifier

    public void updateClassifier(Instance instance) throws Exception
    Updates the classifier with the given instance.
    Specified by:
      `updateClassifier` in interface `UpdateableClassifier`
    Parameters:
      `instance` - the new training instance to include in the model
    Throws:
      `Exception` - if the instance could not be incorporated in the model.

  - ### distributionForInstance

    public double[] distributionForInstance(Instance inst) throws Exception
    Returns the distribution for an instance.
    Specified by:
      `distributionForInstance` in interface `Classifier`
    Overrides:
      `distributionForInstance` in class `MultiClassClassifier`
    Parameters:
      `inst` - the instance to get the distribution for
    Returns:
      the distribution
    Throws:
      `Exception` - if the distribution can't be computed successfully

  - ### getRevision

    public String getRevision()
    Returns the revision string.
    Specified by:
      `getRevision` in interface `RevisionHandler`
    Overrides:
      `getRevision` in class `MultiClassClassifier`
    Returns:
      the revision

  - ### main

    public static void main(String[] argv)
    Main method for testing this class.
    Parameters:
      `argv` - the options