Package weka.classifiers.functions.supportVector

# Class KernelEvaluation

java.lang.Object
weka.classifiers.functions.supportVector.KernelEvaluation

All Implemented Interfaces:
  `RevisionHandler`

public class KernelEvaluation extends Object implements RevisionHandler
Class for evaluating Kernels.

Version:
  $Revision: 14534 $
Author:
  fracpete (fracpete at waikato dot ac dot nz)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `KernelEvaluation()`
  default constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  Tests whether the current evaluation object is equal to another evaluation object
  `static String`
  `evaluate(String kernelString, String[] options)`
  Evaluates a kernel with the options given in an array of strings.
  `static String`
  `evaluate(Kernel Kernel, String[] options)`
  Evaluates the Kernel with the given commandline options and returns the evaluation string.
  `String`
  `evaluate(Kernel kernel, Instances data)`
  Evaluates the Kernel with the given commandline options and returns the evaluation string.
  `String`
  `getRevision()`
  Returns the revision string.
  `String[]`
  `getUserOptions()`
  returns the options the user supplied for the kernel
  `static void`
  `main(String[] args)`
  A test method for this class.
  `void`
  `setUserOptions(String[] options)`
  sets the option the user supplied for the kernel
  `String`
  `toString()`
  returns the current result
  `String`
  `toSummaryString()`
  returns a summary string of the evaluation with a no title
  `String`
  `toSummaryString(String title)`
  returns a summary string of the evaluation with a default title

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

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

- ## Constructor Details

  - ### KernelEvaluation

    public KernelEvaluation()
    default constructor

- ## Method Details

  - ### setUserOptions

    public void setUserOptions(String[] options)
    sets the option the user supplied for the kernel
    Parameters:
      `options` - options that were supplied for the kernel

  - ### getUserOptions

    public String[] getUserOptions()
    returns the options the user supplied for the kernel
    Returns:
      the user supplied options for the kernel

  - ### evaluate

    public static String evaluate(Kernel Kernel, String[] options) throws Exception
    Evaluates the Kernel with the given commandline options and returns the evaluation string.
    Parameters:
      `Kernel` - the Kernel to evaluate
      `options` - the commandline options
    Returns:
      the generated output string
    Throws:
      `Exception` - if evaluation fails

  - ### evaluate

    public static String evaluate(String kernelString, String[] options) throws Exception
    Evaluates a kernel with the options given in an array of strings.
    Parameters:
      `kernelString` - class of kernel as a string
      `options` - the array of string containing the options
    Returns:
      a string describing the results
    Throws:
      `Exception` - if model could not be evaluated successfully

  - ### evaluate

    public String evaluate(Kernel kernel, Instances data) throws Exception
    Evaluates the Kernel with the given commandline options and returns the evaluation string.
    Parameters:
      `kernel` - the Kernel to evaluate
      `data` - the data to run the Kernel with
    Returns:
      the generated output string
    Throws:
      `Exception` - if evaluation fails

  - ### equals

    public boolean equals(Object obj)
    Tests whether the current evaluation object is equal to another evaluation object
    Overrides:
      `equals` in class `Object`
    Parameters:
      `obj` - the object to compare against
    Returns:
      true if the two objects are equal

  - ### toSummaryString

    public String toSummaryString()
    returns a summary string of the evaluation with a no title
    Returns:
      the summary string

  - ### toSummaryString

    public String toSummaryString(String title)
    returns a summary string of the evaluation with a default title
    Parameters:
      `title` - the title to print before the result
    Returns:
      the summary string

  - ### toString

    public String toString()
    returns the current result
    Overrides:
      `toString` in class `Object`
    Returns:
      the currently stored result
    See Also:
      - `toSummaryString()`

  - ### getRevision

    public String getRevision()
    Returns the revision string.
    Specified by:
      `getRevision` in interface `RevisionHandler`
    Returns:
      the revision

  - ### main

    public static void main(String[] args)
    A test method for this class. Just extracts the first command line argument as a kernel class name and calls evaluate.
    Parameters:
      `args` - an array of command line arguments, the first of which must be the class name of a kernel.