weka.classifiers.functions

## Class GaussianProcesses

- java.lang.Object
- - weka.classifiers.AbstractClassifier
  - - weka.classifiers.functions.GaussianProcesses

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, ConditionalDensityEstimator, IntervalEstimator, CapabilitiesHandler, CapabilitiesIgnorer, OptionHandler, RevisionHandler, TechnicalInformationHandler, WeightedInstancesHandler

      public class GaussianProcesses
      extends AbstractClassifier
      implements OptionHandler, IntervalEstimator, ConditionalDensityEstimator, TechnicalInformationHandler, WeightedInstancesHandler

  Implements Gaussian processes for regression without hyperparameter-tuning. To make choosing an appropriate noise level easier, this implementation applies normalization/standardization to the target attribute as well (if normalization/standardizaton is turned on). Missing values are replaced by the global mean/mode. Nominal attributes are converted to binary ones. BibTeX:

  Version:
    $Revision: 10381 $
  Author:
    Kurt Driessens (kurtd@cs.waikato.ac.nz), Remco Bouckaert (remco@cs.waikato.ac.nz)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FILTER_NONE` no filter
    `static int` | `FILTER_NORMALIZE` normalizes the data
    `static int` | `FILTER_STANDARDIZE` standardizes the data
    `double[][]` | `m_L` (negative) covariance matrix in symmetric matrix representation
    `static Tag[]` | `TAGS_FILTER` The filter to apply to the training data

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GaussianProcesses()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `buildClassifier(Instances insts)` Method for building the classifier.
    `double` | `classifyInstance(Instance inst)` Classifies a given instance.
    `java.lang.String` | `filterTypeTipText()` Returns the tip text for this property
    `Capabilities` | `getCapabilities()` Returns default capabilities of the classifier.
    `SelectedTag` | `getFilterType()` Gets how the training data will be transformed.
    `Kernel` | `getKernel()` Gets the kernel to use.
    `double` | `getNoise()` Get the value of noise.
    `java.lang.String[]` | `getOptions()` Gets the current settings of the classifier.
    `double` | `getStandardDeviation(Instance inst)` Gives standard deviation of the prediction at the given instance.
    `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<Option>` | `listOptions()` Returns an enumeration describing the available options.
    `double` | `logDensity(Instance inst, double value)` Returns natural logarithm of density estimate for given value based on given instance.
    `static void` | `main(java.lang.String[] argv)` Main method for testing this class.
    `java.lang.String` | `noiseTipText()` Returns the tip text for this property
    `double[][]` | `predictIntervals(Instance inst, double confidenceLevel)` Computes a prediction interval for the given instance and confidence level.
    `void` | `setFilterType(SelectedTag newType)` Sets how the training data will be transformed.
    `void` | `setKernel(Kernel value)` Sets the kernel to use.
    `void` | `setNoise(double v)` Set the level of Gaussian Noise.
    `void` | `setOptions(java.lang.String[] options)` Parses a given list of options.
    `java.lang.String` | `toString()` Prints out the classifier.

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

      `debugTipText, distributionForInstance, doNotCheckCapabilitiesTipText, forName, getDebug, getDoNotCheckCapabilities, getRevision, makeCopies, makeCopy, runClassifier, setDebug, setDoNotCheckCapabilities`

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

      normalizes the data
      See Also:
        Constant Field Values

    - #### FILTER_STANDARDIZE

          public static final int FILTER_STANDARDIZE

      standardizes the data
      See Also:
        Constant Field Values

    - #### FILTER_NONE

          public static final int FILTER_NONE

      no filter
      See Also:
        Constant Field Values

    - #### TAGS_FILTER

          public static final Tag[] TAGS_FILTER

      The filter to apply to the training data

    - #### m_L

          public double[][] m_L

      (negative) covariance matrix in symmetric matrix representation

  - ### Constructor Detail

    - #### GaussianProcesses

          public GaussianProcesses()

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

    - #### getCapabilities

          public Capabilities getCapabilities()

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

    - #### buildClassifier

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

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

    - #### classifyInstance

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

      Classifies a given instance.
      Specified by:
        `classifyInstance` in interface `Classifier`
      Overrides:
        `classifyInstance` in class `AbstractClassifier`
      Parameters:
        `inst` - the instance to be classified
      Returns:
        the classification
      Throws:
        `java.lang.Exception` - if instance could not be classified successfully

    - #### predictIntervals

          public double[][] predictIntervals(Instance inst,
                                    double confidenceLevel)
                                      throws java.lang.Exception

      Computes a prediction interval for the given instance and confidence level.
      Specified by:
        `predictIntervals` in interface `IntervalEstimator`
      Parameters:
        `inst` - the instance to make the prediction for
        `confidenceLevel` - the percentage of cases the interval should cover
      Returns:
        a 1*2 array that contains the boundaries of the interval
      Throws:
        `java.lang.Exception` - if interval could not be estimated successfully

    - #### getStandardDeviation

          public double getStandardDeviation(Instance inst)
                                      throws java.lang.Exception

      Gives standard deviation of the prediction at the given instance.
      Parameters:
        `inst` - the instance to get the standard deviation for
      Returns:
        the standard deviation
      Throws:
        `java.lang.Exception` - if computation fails

    - #### logDensity

          public double logDensity(Instance inst,
                          double value)
                            throws java.lang.Exception

      Returns natural logarithm of density estimate for given value based on given instance.
      Specified by:
        `logDensity` in interface `ConditionalDensityEstimator`
      Parameters:
        `instance` - the instance to make the prediction for.
        `value` - the value to make the prediction for.
      Returns:
        the natural logarithm of the density estimate
      Throws:
        `java.lang.Exception` - if the density cannot be computed

    - #### listOptions

          public java.util.Enumeration<Option> listOptions()

      Returns an enumeration describing the available options.
      Specified by:
        `listOptions` in interface `OptionHandler`
      Overrides:
        `listOptions` in class `AbstractClassifier`
      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
                  If set, classifier is run in debug mode and
                  may output additional info to the console

                 -L <double>
                  Level of Gaussian Noise. (default 0.1)

                 -M <double>
                  Level of Gaussian Noise for the class. (default 0.1)

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

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

                 Options specific to kernel weka.classifiers.functions.supportVector.RBFKernel:

                 -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).
                  (default: 250007)

                 -G <num>
                  The Gamma parameter.
                  (default: 0.01)

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

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

    - #### getKernel

          public Kernel getKernel()

      Gets the kernel to use.
      Returns:
        the kernel

    - #### setKernel

          public void setKernel(Kernel value)

      Sets the kernel to use.
      Parameters:
        `value` - the new kernel

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

    - #### noiseTipText

          public java.lang.String noiseTipText()

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

    - #### getNoise

          public double getNoise()

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

    - #### setNoise

          public void setNoise(double v)

      Set the level of Gaussian Noise.
      Parameters:
        `v` - Value to assign to noise.

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

    - #### main

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

      Main method for testing this class.
      Parameters:
        `argv` - the commandline parameters