All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.functions.supportVector.Kernel
java.lang.Object
|
+----weka.classifiers.functions.supportVector.Kernel
- public abstract class Kernel
- extends java.lang.Object
- implements java.io.Serializable
Abstract kernel.
Kernels implementing this class must respect Mercer's condition in order
to ensure a correct behaviour of SMOreg.
- Version:
- $$
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
Kernel()
-
clean()
- Frees the memory used by the kernel.
eval(int, int, Instance)
- Computes the result of the kernel function for two instances.
numEvals()
- Returns the number of kernel evaluation performed.
Kernel
public Kernel()
eval
public abstract double eval(int id1,
int id2,
Instance inst1) throws java.lang.Exception
Computes the result of the kernel function for two instances.
If id1 == -1, eval use inst1 instead of an instance in the dataset.
- Parameters:
id1 - the index of the first instance in the dataset
id2 - the index of the second instance in the dataset
inst - the instance corresponding to id1 (used if id1 == -1)
- Returns:
- the result of the kernel function
clean
public abstract void clean()
Frees the memory used by the kernel.
(Usefull 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.
numEvals
public abstract int numEvals()
Returns the number of kernel evaluation performed.
- Returns:
- the number of kernel evaluation performed.
All Packages Class Hierarchy This Package Previous Next Index WEKA's home