SVMreg

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.functions
Class SVMreg

    java.lang.Object
      weka.classifiers.Classifier
          weka.classifiers.functions.SVMreg

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, AdditionalMeasureProducer, CapabilitiesHandler, OptionHandler, RevisionHandler, TechnicalInformationHandler, WeightedInstancesHandler

    public class SVMreg

extends Classifier
implements WeightedInstancesHandler, AdditionalMeasureProducer, TechnicalInformationHandler

SVMreg implements the support vector machine for regression. The parameters can be learned using various algorithms. The algorithm is selected by setting the RegOptimizer. The most popular algorithm (RegSMOImproved) is due to Shevade, Keerthi et al and this is the default RegOptimizer.
For more information see:
S.K. Shevade, S.S. Keerthi, C. Bhattacharyya, K.R.K. Murthy: Improvements to the SMO Algorithm for SVM Regression. In: IEEE Transactions on Neural Networks, 1999.
A.J. Smola, B. Schoelkopf (1998). A tutorial on support vector regression.

BibTeX:

     @inproceedings{Shevade1999,
        author = {S.K. Shevade and S.S. Keerthi and C. Bhattacharyya and K.R.K. Murthy},
        booktitle = {IEEE Transactions on Neural Networks},
        title = {Improvements to the SMO Algorithm for SVM Regression},
        year = {1999},
        PS = {http://guppy.mpe.nus.edu.sg/\~mpessk/svm/ieee_smo_reg.ps.gz}
     }

     @techreport{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:

     -C <double>
      The complexity constant C.
      (default 1)

     -N
      Whether to 0=normalize/1=standardize/2=neither.
      (default 0=normalize)

     -I <classname and parameters>
      Optimizer class used for solving quadratic optimization problem
      (default weka.classifiers.functions.supportVector.RegSMOImproved)

     -K <classname and parameters>
      The Kernel to use.
      (default: weka.classifiers.functions.supportVector.PolyKernel)

     Options specific to optimizer ('-I') weka.classifiers.functions.supportVector.RegSMOImproved:

     -T <double>
      The tolerance parameter for checking the stopping criterion.
      (default 0.001)

     -V
      Use variant 1 of the algorithm when true, otherwise use variant 2.
      (default true)

     -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)

     Options specific to kernel ('-K') weka.classifiers.functions.supportVector.PolyKernel:

     -D
      Enables debugging output (if available) to be printed.
      (default: off)

     -no-checks
      Turns off all checks - use with caution!
      (default: checks on)

     -C <num>
      The size of the cache (a prime number), 0 for full cache and
      -1 to turn it off.
      (default: 250007)

     -E <num>
      The Exponent to use.
      (default: 1.0)

     -L
      Use lower-order terms.
      (default: no)

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

Field Summary
`static int` | `FILTER_NONE` The filter to apply to the training data: None
`static int` | `FILTER_NORMALIZE` The filter to apply to the training data: Normalzie
`static int` | `FILTER_STANDARDIZE` The filter to apply to the training data: Standardize
`static Tag[]` | `TAGS_FILTER` The filter to apply to the training data

Constructor Summary
`SVMreg()`

Method Summary
`void` | `buildClassifier(Instances instances)` Method for building the classifier.
`double` | `classifyInstance(Instance instance)` Classifies the given instance using the linear regression function.
`java.lang.String` | `cTipText()` Returns the tip text for this property
`java.util.Enumeration` | `enumerateMeasures()` Returns an enumeration of the measure names.
`java.lang.String` | `filterTypeTipText()` Returns the tip text for this property
`double` | `getC()` Get the value of C.
`Capabilities` | `getCapabilities()` Returns default capabilities of the classifier.
`SelectedTag` | `getFilterType()` Gets how the training data will be transformed.
`Kernel` | `getKernel()` Returns the kernel to use
`double` | `getMeasure(java.lang.String measureName)` Returns the value of the named measure
`java.lang.String[]` | `getOptions()` Gets the current settings of the classifier.
`RegOptimizer` | `getRegOptimizer()` returns the learning algorithm
`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.lang.String` | `kernelTipText()` Returns the tip text for this property
`java.util.Enumeration` | `listOptions()` Returns an enumeration describing the available options.
`static void` | `main(java.lang.String[] args)` Main method for running this classifier.
`java.lang.String` | `regOptimizerTipText()` Returns the tip text for this property
`void` | `setC(double v)` Set the value of C.
`void` | `setFilterType(SelectedTag newType)` Sets how the training data will be transformed.
`void` | `setKernel(Kernel value)` sets the kernel to use
`void` | `setOptions(java.lang.String[] options)` Parses a given list of options.
`void` | `setRegOptimizer(RegOptimizer regOptimizer)` sets the learning algorithm
`java.lang.String` | `toString()` Prints out the classifier.

Methods inherited from class weka.classifiers.Classifier
`debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### FILTER_NORMALIZE

    public static final int FILTER_NORMALIZE

  The filter to apply to the training data: Normalzie

  See Also:
    Constant Field Values

### FILTER_STANDARDIZE

    public static final int FILTER_STANDARDIZE

  The filter to apply to the training data: Standardize

  See Also:
    Constant Field Values

### FILTER_NONE

    public static final int FILTER_NONE

  The filter to apply to the training data: None

  See Also:
    Constant Field Values

### TAGS_FILTER

    public static final Tag[] TAGS_FILTER

  The filter to apply to the training data

Constructor Detail

### SVMreg

    public SVMreg()

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 listOptions()

  Returns an enumeration describing the available options.

  Specified by:
    `listOptions` in interface `OptionHandler`
  Overrides:
    `listOptions` in class `Classifier`
  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:

       -C <double>
        The complexity constant C.
        (default 1)

       -N
        Whether to 0=normalize/1=standardize/2=neither.
        (default 0=normalize)

       -I <classname and parameters>
        Optimizer class used for solving quadratic optimization problem
        (default weka.classifiers.functions.supportVector.RegSMOImproved)

       -K <classname and parameters>
        The Kernel to use.
        (default: weka.classifiers.functions.supportVector.PolyKernel)

       Options specific to optimizer ('-I') weka.classifiers.functions.supportVector.RegSMOImproved:

       -T <double>
        The tolerance parameter for checking the stopping criterion.
        (default 0.001)

       -V
        Use variant 1 of the algorithm when true, otherwise use variant 2.
        (default true)

       -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)

       Options specific to kernel ('-K') weka.classifiers.functions.supportVector.PolyKernel:

       -D
        Enables debugging output (if available) to be printed.
        (default: off)

       -no-checks
        Turns off all checks - use with caution!
        (default: checks on)

       -C <num>
        The size of the cache (a prime number), 0 for full cache and
        -1 to turn it off.
        (default: 250007)

       -E <num>
        The Exponent to use.
        (default: 1.0)

       -L
        Use lower-order terms.
        (default: no)

  Specified by:
    `setOptions` in interface `OptionHandler`
  Overrides:
    `setOptions` in class `Classifier`
  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 `Classifier`
  Returns:
    an array of strings suitable for passing to setOptions

### getCapabilities

    public Capabilities getCapabilities()

  Returns default capabilities of the classifier.

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

### buildClassifier

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

  Method for building the classifier.

  Specified by:
    `buildClassifier` in class `Classifier`
  Parameters:
    `instances` - the set of training instances
  Throws:
    `java.lang.Exception` - if the classifier can't be built successfully

### classifyInstance

    public double classifyInstance(Instance instance)
                            throws java.lang.Exception

  Classifies the given instance using the linear regression function.

  Overrides:
    `classifyInstance` in class `Classifier`
  Parameters:
    `instance` - the test instance
  Returns:
    the classification
  Throws:
    `java.lang.Exception` - if classification can't be done successfully

### regOptimizerTipText

    public java.lang.String regOptimizerTipText()

  Returns the tip text for this property

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

### setRegOptimizer

    public void setRegOptimizer(RegOptimizer regOptimizer)

  sets the learning algorithm

  Parameters:
    `regOptimizer` - the learning algorithm

### getRegOptimizer

    public RegOptimizer getRegOptimizer()

  returns the learning algorithm

  Returns:
    the learning algorithm

### kernelTipText

    public java.lang.String kernelTipText()

  Returns the tip text for this property

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

### setKernel

    public void setKernel(Kernel value)

  sets the kernel to use

  Parameters:
    `value` - the kernel to use

### getKernel

    public Kernel getKernel()

  Returns the kernel to use

  Returns:
    the current kernel

### cTipText

    public java.lang.String cTipText()

  Returns the tip text for this property

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

### getC

    public double getC()

  Get the value of C.

  Returns:
    Value of C.

### setC

    public void setC(double v)

  Set the value of C.

  Parameters:
    `v` - Value to assign to C.

### filterTypeTipText

    public java.lang.String filterTypeTipText()

  Returns the tip text for this property

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

### getFilterType

    public SelectedTag getFilterType()

  Gets how the training data will be transformed. Will be one of FILTER_NORMALIZE, FILTER_STANDARDIZE, FILTER_NONE.

  Returns:
    the filtering mode

### setFilterType

    public void setFilterType(SelectedTag newType)

  Sets how the training data will be transformed. Should be one of FILTER_NORMALIZE, FILTER_STANDARDIZE, FILTER_NONE.

  Parameters:
    `newType` - the new filtering mode

### toString

    public java.lang.String toString()

  Prints out the classifier.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a description of the classifier as a string

### enumerateMeasures

    public java.util.Enumeration enumerateMeasures()

  Returns an enumeration of the measure names. Additional measures must follow the naming convention of starting with "measure", eg. double measureBlah()

  Specified by:
    `enumerateMeasures` in interface `AdditionalMeasureProducer`
  Returns:
    an enumeration of the measure names

### getMeasure

    public double getMeasure(java.lang.String measureName)

  Returns the value of the named measure

  Specified by:
    `getMeasure` in interface `AdditionalMeasureProducer`
  Parameters:
    `measureName` - the name of the measure to query for its value
  Returns:
    the value of the named measure
  Throws:
    `java.lang.IllegalArgumentException` - if the named measure is not supported

### getRevision

    public java.lang.String getRevision()

  Returns the revision string.

  Specified by:
    `getRevision` in interface `RevisionHandler`
  Returns:
    the revision

### main

    public static void main(java.lang.String[] args)

  Main method for running this classifier.

  Parameters:
    `args` - the commandline options

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD