|
||||||||||
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
weka.classifiers.functions.supportVector.PolyKernel
weka.classifiers.functions.supportVector.NormalizedPolyKernel
public class NormalizedPolyKernel
The normalized polynomial kernel.
K(x,y) = <x,y>/sqrt(<x,x><y,y>) where <x,y> = PolyKernel(x,y)
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number). (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
Constructor Summary | |
---|---|
NormalizedPolyKernel()
default constructor - does nothing |
|
NormalizedPolyKernel(Instances dataset,
int cacheSize,
double exponent,
boolean lowerOrder)
Creates a new NormalizedPolyKernel instance. |
Method Summary | |
---|---|
double |
eval(int id1,
int id2,
Instance inst1)
Computes the result of the kernel function for two instances. |
java.lang.String |
globalInfo()
Returns a string describing the kernel |
void |
setExponent(double value)
Sets the exponent value (must be different from 1.0). |
java.lang.String |
toString()
returns a string representation for the Kernel |
Methods inherited from class weka.classifiers.functions.supportVector.PolyKernel |
---|
exponentTipText, getCapabilities, getExponent, getOptions, getUseLowerOrder, listOptions, setOptions, setUseLowerOrder, useLowerOrderTipText |
Methods inherited from class weka.classifiers.functions.supportVector.CachedKernel |
---|
buildKernel, cacheSizeTipText, clean, getCacheSize, numCacheHits, numEvals, setCacheSize |
Methods inherited from class weka.classifiers.functions.supportVector.Kernel |
---|
checksTurnedOffTipText, debugTipText, forName, getChecksTurnedOff, getDebug, makeCopies, makeCopy, setChecksTurnedOff, setDebug |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NormalizedPolyKernel()
public NormalizedPolyKernel(Instances dataset, int cacheSize, double exponent, boolean lowerOrder) throws java.lang.Exception
NormalizedPolyKernel
instance.
dataset
- the training dataset used.cacheSize
- the size of the cache (a prime number)exponent
- the exponent to uselowerOrder
- whether to use lower-order terms
java.lang.Exception
- if something goes wrongMethod Detail |
---|
public java.lang.String globalInfo()
globalInfo
in class PolyKernel
public double eval(int id1, int id2, Instance inst1) throws java.lang.Exception
eval
in class CachedKernel
id1
- the index of the first instance in the datasetid2
- the index of the second instance in the datasetinst1
- the instance corresponding to id1 (used if id1 == -1)
java.lang.Exception
- if something goes wrongpublic void setExponent(double value)
setExponent
in class PolyKernel
value
- the exponent valuepublic java.lang.String toString()
toString
in class PolyKernel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |