All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.functions.supportVector.PolyKernel

java.lang.Object
    |
    +----weka.classifiers.functions.supportVector.Kernel
            |
            +----weka.classifiers.functions.supportVector.PolyKernel

public class PolyKernel
extends Kernel
The polynomial kernel : K(x, y) = ^p or K(x, y) = (+1)^p

Version:
$$
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
Author:
Shane Legg (shane@intelligenesis.net) (sparse vector code)
Author:
Stuart Inglis (stuart@reeltwo.com) (sparse vector code)

Constructor Index

 o PolyKernel(Instances, int, double, boolean)
Creates a new PolyKernel instance.

Method Index

 o clean()
Frees the cache used by the kernel.
 o eval(int, int, Instance)
Implements the abstract function of Kernel.
 o numEvals()
Returns the number of time Eval has been called.

Constructor Detail

 o PolyKernel
public PolyKernel(Instances dataset,
                  int cacheSize,
                  double exponent,
                  boolean lowerOrder)
          Creates a new PolyKernel instance.
Parameters:
dataset - the training dataset used.
cacheSize - the size of the cache (a prime number)

Method Detail

 o eval
public double eval(int id1,
                   int id2,
                   Instance inst1) throws java.lang.Exception
          Implements the abstract function of Kernel.
Overrides:
eval in class Kernel
 o clean
public void clean()
          Frees the cache used by the kernel.
Overrides:
clean in class Kernel
 o numEvals
public int numEvals()
          Returns the number of time Eval has been called.
Returns:
the number of kernel evaluation.
Overrides:
numEvals in class Kernel

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home