类 PrecomputedKernelMatrixKernel

java.lang.Object
weka.classifiers.functions.supportVector.Kernel
weka.classifiers.functions.supportVector.PrecomputedKernelMatrixKernel
所有已实现的接口:
Serializable, CapabilitiesHandler, Copyable, OptionHandler, RevisionHandler

public class PrecomputedKernelMatrixKernel extends Kernel implements Copyable
This kernel is based on a static kernel matrix that is read from a file. Instances must have a single nominal attribute (excluding the class). This attribute must be the first attribute in the file and its values are used to reference rows/columns in the kernel matrix. The second attribute must be the class attribute.

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)
 -M <file name>
  The file name of the file that holds the kernel matrix.
  (default: kernelMatrix.matrix)
版本:
$Revision: 9897 $
作者:
Eibe Frank (eibe@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • PrecomputedKernelMatrixKernel

      public PrecomputedKernelMatrixKernel()
  • 方法详细资料

    • copy

      public Object copy()
      Return a shallow copy of this kernel
      指定者:
      copy 在接口中 Copyable
      返回:
      a shallow copy of this kernel
    • globalInfo

      public String globalInfo()
      Returns a string describing the kernel
      指定者:
      globalInfo 在类中 Kernel
      返回:
      a description suitable for displaying in the explorer/experimenter gui
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 Kernel
      返回:
      an enumeration of all the available options.
    • setOptions

      public void setOptions(String[] options) throws 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)
       -M <file name>
        The file name of the file that holds the kernel matrix.
        (default: kernelMatrix.matrix)
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 Kernel
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • getOptions

      public String[] getOptions()
      Gets the current settings of the Kernel.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 Kernel
      返回:
      an array of strings suitable for passing to setOptions
    • eval

      public double eval(int id1, int id2, Instance inst1) throws Exception
      从类复制的说明: Kernel
      Computes the result of the kernel function for two instances. If id1 == -1, eval use inst1 instead of an instance in the dataset.
      指定者:
      eval 在类中 Kernel
      参数:
      id1 - the index of instance 1
      id2 - the index of instance 2
      inst1 - the instance 1 object
      返回:
      the dot product
      抛出:
      Exception - if something goes wrong
    • getCapabilities

      public Capabilities getCapabilities()
      Returns the Capabilities of this kernel.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      覆盖:
      getCapabilities 在类中 Kernel
      返回:
      the capabilities of this object
      另请参阅:
    • setKernelMatrixFile

      public void setKernelMatrixFile(File f)
      Sets the file holding the kernel matrix
      参数:
      value - the exponent value
    • getKernelMatrixFile

      public File getKernelMatrixFile()
      Gets the file containing the kernel matrix.
      返回:
      the exponent value
    • kernelMatrixFileTipText

      public String kernelMatrixFileTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • toString

      public String toString()
      returns a string representation for the Kernel
      覆盖:
      toString 在类中 Object
      返回:
      a string representaiton of the kernel
    • clean

      public void clean()
      Frees the memory used by the kernel. (Useful with kernels which use cache.) This function is called when the training is done. i.e. after that, eval will be called with id1 == -1.
      指定者:
      clean 在类中 Kernel
    • numEvals

      public int numEvals()
      Returns the number of kernel evaluation performed.
      指定者:
      numEvals 在类中 Kernel
      返回:
      the number of kernel evaluation performed.
    • numCacheHits

      public int numCacheHits()
      Returns the number of dot product cache hits.
      指定者:
      numCacheHits 在类中 Kernel
      返回:
      the number of dot product cache hits, or -1 if not supported by this kernel.
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 Kernel
      返回:
      the revision