weka.classifiers.functions.supportVector

## Class RegSMO

- java.lang.Object
- - weka.classifiers.functions.supportVector.RegOptimizer
  - - weka.classifiers.functions.supportVector.RegSMO

- All Implemented Interfaces:
    java.io.Serializable, OptionHandler, RevisionHandler, TechnicalInformationHandler
  Direct Known Subclasses:
    RegSMOImproved

      public class RegSMO
      extends RegOptimizer
      implements TechnicalInformationHandler

  Implementation of SMO for support vector regression as described in :
  A.J. Smola, B. Schoelkopf (1998). A tutorial on support vector regression.

  BibTeX:

       @misc{Smola1998,
          author = {A.J. Smola and B. Schoelkopf},
          note = {NeuroCOLT2 Technical Report NC2-TR-1998-030},
          title = {A tutorial on support vector regression},
          year = {1998}
       }

  Valid options are:

       -P <double>
        The epsilon for round-off error.
        (default 1.0e-12)

       -L <double>
        The epsilon parameter in epsilon-insensitive loss function.
        (default 1.0e-3)

       -W <double>
        The random number seed.
        (default 1)

  Version:
    $Revision: 10169 $
  Author:
    Remco Bouckaert (remco@cs.waikato.ac.nz,rrb@xm.co.nz)
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class weka.classifiers.functions.supportVector.RegOptimizer

      `m_alpha, m_alphaStar`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegSMO()` default constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `buildClassifier(Instances instances)` learn SVM parameters from data using Smola's SMO algorithm.
    `java.lang.String` | `epsilonTipText()` Returns the tip text for this property
    `double` | `getEpsilon()` Get the value of epsilon.
    `java.lang.String[]` | `getOptions()` Gets the current settings of the classifier.
    `java.lang.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.
    `java.lang.String` | `globalInfo()` Returns a string describing classifier
    `java.util.Enumeration<Option>` | `listOptions()` Returns an enumeration describing the available options
    `void` | `optimize()` finds alpha and alpha* parameters that optimize the SVM target function
    `void` | `setEpsilon(double v)` Set the value of epsilon.
    `void` | `setOptions(java.lang.String[] options)` Parses a given list of options.

    - ### Methods inherited from class weka.classifiers.functions.supportVector.RegOptimizer

      `epsilonParameterTipText, getCacheHits, getEpsilonParameter, getKernelEvaluations, getSeed, modelBuilt, seedTipText, setEpsilonParameter, setSeed, setSMOReg, SVMOutput, toString`

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

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

- - ### Constructor Detail

    - #### RegSMO

          public RegSMO()

      default constructor

  - ### Method Detail

    - #### globalInfo

          public java.lang.String globalInfo()

      Returns a string describing classifier
      Returns:
        a description 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 java.util.Enumeration<Option> listOptions()

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

    - #### setOptions

          public void setOptions(java.lang.String[] options)
                          throws java.lang.Exception

      Parses a given list of options.

      Valid options are:

           -P <double>
            The epsilon for round-off error.
            (default 1.0e-12)

           -L <double>
            The epsilon parameter in epsilon-insensitive loss function.
            (default 1.0e-3)

           -W <double>
            The random number seed.
            (default 1)

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

    - #### getOptions

          public java.lang.String[] getOptions()

      Gets the current settings of the classifier.
      Specified by:
        `getOptions` in interface `OptionHandler`
      Overrides:
        `getOptions` in class `RegOptimizer`
      Returns:
        an array of strings suitable for passing to setOptions

    - #### epsilonTipText

          public java.lang.String epsilonTipText()

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

    - #### getEpsilon

          public double getEpsilon()

      Get the value of epsilon.
      Returns:
        Value of epsilon.

    - #### setEpsilon

          public void setEpsilon(double v)

      Set the value of epsilon.
      Parameters:
        `v` - Value to assign to epsilon.

    - #### optimize

          public void optimize()
                        throws java.lang.Exception

      finds alpha and alpha* parameters that optimize the SVM target function
      Throws:
        `java.lang.Exception`

    - #### buildClassifier

          public void buildClassifier(Instances instances)
                               throws java.lang.Exception

      learn SVM parameters from data using Smola's SMO algorithm. Subclasses should implement something more interesting.
      Overrides:
        `buildClassifier` in class `RegOptimizer`
      Parameters:
        `instances` - the data to learn from
      Throws:
        `java.lang.Exception` - if something goes wrong

    - #### getRevision

          public java.lang.String getRevision()

      Returns the revision string.
      Specified by:
        `getRevision` in interface `RevisionHandler`
      Overrides:
        `getRevision` in class `RegOptimizer`
      Returns:
        the revision