weka.classifiers.functions.supportVector

## Class Puk

- java.lang.Object
- - weka.classifiers.functions.supportVector.Kernel
  - - weka.classifiers.functions.supportVector.CachedKernel
    - - weka.classifiers.functions.supportVector.Puk

- All Implemented Interfaces:
    java.io.Serializable, CapabilitiesHandler, CapabilitiesIgnorer, OptionHandler, RevisionHandler, TechnicalInformationHandler

      public class Puk
      extends CachedKernel
      implements TechnicalInformationHandler

  The Pearson VII function-based universal kernel.
  For more information see:
  B. Uestuen, W.J. Melssen, L.M.C. Buydens (2006). Facilitating the application of Support Vector Regression by using a universal Pearson VII function based kernel. Chemometrics and Intelligent Laboratory Systems. 81:29-40.

  Valid options are:

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

       -O <num>
        The Omega parameter.
        (default: 1.0)

       -S <num>
        The Sigma parameter.
        (default: 1.0)

  Version:
    $Revision: 12518 $
  Author:
    Bernhard Pfahringer (bernhard@cs.waikato.ac.nz)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Puk()` default constructor - does nothing.
    `Puk(Instances data, int cacheSize, double omega, double sigma)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `buildKernel(Instances data)` builds the kernel with the given data.
    `Capabilities` | `getCapabilities()` Returns the Capabilities of this kernel.
    `double` | `getOmega()` Gets the omega value.
    `java.lang.String[]` | `getOptions()` Gets the current settings of the Kernel.
    `java.lang.String` | `getRevision()` Returns the revision string.
    `double` | `getSigma()` Gets the sigma value.
    `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 the kernel
    `java.util.Enumeration<Option>` | `listOptions()` Returns an enumeration describing the available options.
    `java.lang.String` | `omegaTipText()` Returns the tip text for this property
    `void` | `setOmega(double value)` Sets the omega value.
    `void` | `setOptions(java.lang.String[] options)` Parses a given list of options.
    `void` | `setSigma(double value)` Sets the sigma value.
    `java.lang.String` | `sigmaTipText()` Returns the tip text for this property
    `java.lang.String` | `toString()` returns a string representation for the Kernel

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

      `cacheSizeTipText, clean, eval, getCacheSize, numCacheHits, numEvals, setCacheSize`

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

      `checksTurnedOffTipText, debugTipText, doNotCheckCapabilitiesTipText, forName, getChecksTurnedOff, getDebug, getDoNotCheckCapabilities, makeCopies, makeCopy, setChecksTurnedOff, setDebug, setDoNotCheckCapabilities`

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

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

- - ### Constructor Detail

    - #### Puk

          public Puk()

      default constructor - does nothing.

    - #### Puk

          public Puk(Instances data,
                     int cacheSize,
                     double omega,
                     double sigma)
              throws java.lang.Exception

      Constructor. Initializes m_kernelPrecalc[].
      Parameters:
        `data` - the data to use
        `cacheSize` - the size of the cache
        `omega` - the exponent
        `sigma` - the bandwidth
      Throws:
        `java.lang.Exception` - if something goes wrong

  - ### Method Detail

    - #### globalInfo

          public java.lang.String globalInfo()

      Returns a string describing the kernel
      Specified by:
        `globalInfo` in class `Kernel`
      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 `CachedKernel`
      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:

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

           -O <num>
            The Omega parameter.
            (default: 1.0)

           -S <num>
            The Sigma parameter.
            (default: 1.0)

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

    - #### setOmega

          public void setOmega(double value)

      Sets the omega value.
      Parameters:
        `value` - the omega value

    - #### getOmega

          public double getOmega()

      Gets the omega value.
      Returns:
        the omega value

    - #### omegaTipText

          public java.lang.String omegaTipText()

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

    - #### setSigma

          public void setSigma(double value)

      Sets the sigma value.
      Parameters:
        `value` - the sigma value

    - #### getSigma

          public double getSigma()

      Gets the sigma value.
      Returns:
        the sigma value

    - #### sigmaTipText

          public java.lang.String sigmaTipText()

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

    - #### getCapabilities

          public Capabilities getCapabilities()

      Returns the Capabilities of this kernel.
      Specified by:
        `getCapabilities` in interface `CapabilitiesHandler`
      Overrides:
        `getCapabilities` in class `Kernel`
      Returns:
        the capabilities of this object
      See Also:
        `Capabilities`

    - #### buildKernel

          public void buildKernel(Instances data)
                           throws java.lang.Exception

      builds the kernel with the given data. Initializes the kernel cache. The actual size of the cache in bytes is (64 * cacheSize).
      Overrides:
        `buildKernel` in class `CachedKernel`
      Parameters:
        `data` - the data to base the kernel on
      Throws:
        `java.lang.Exception` - if something goes wrong

    - #### toString

          public java.lang.String toString()

      returns a string representation for the Kernel
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representaiton of the kernel

    - #### getRevision

          public java.lang.String getRevision()

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