|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.functions.supportVector.Kernel
weka.classifiers.functions.supportVector.CachedKernel
public abstract class CachedKernel
Base class for RBFKernel and PolyKernel that implements a simple LRU. (least-recently-used) cache if the cache size is set to a value > 0. Otherwise it uses a full cache.
Method Summary | |
---|---|
void |
clean()
Frees the cache used by the kernel. |
double |
eval(int id1,
int id2,
Instance inst1)
Implements the abstract function of Kernel using the cache. |
int |
numCacheHits()
Returns the number of cache hits on dot products. |
int |
numEvals()
Returns the number of time Eval has been called. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public double eval(int id1, int id2, Instance inst1) throws java.lang.Exception
eval
in class Kernel
id1
- the index of the first instance in the datasetid2
- the index of the second instance in the dataset
java.lang.Exception
public int numEvals()
numEvals
in class Kernel
public int numCacheHits()
numCacheHits
in class Kernel
public void clean()
clean
in class Kernel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |