|
||||||||||
| 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.PrecomputedKernelMatrixKernel
public class PrecomputedKernelMatrixKernel
This kernel is based on a static kernel matrix that is read from a file. Instances must have a single nominal attribute (excluding the class). This attribute must be the first attribute in the file and its values are used to reference rows/columns in the kernel matrix. The second attribute must be the class attribute.
Valid options are:-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-M <file name> The file name of the file that holds the kernel matrix. (default: kernelMatrix.matrix)
| Constructor Summary | |
|---|---|
PrecomputedKernelMatrixKernel()
|
|
| Method Summary | |
|---|---|
void |
clean()
Frees the memory used by the kernel. |
double |
eval(int id1,
int id2,
Instance inst1)
Computes the result of the kernel function for two instances. |
Capabilities |
getCapabilities()
Returns the Capabilities of this kernel. |
java.io.File |
getKernelMatrixFile()
Gets the file containing the kernel matrix. |
java.lang.String[] |
getOptions()
Gets the current settings of the Kernel. |
java.lang.String |
getRevision()
Returns the revision string. |
java.lang.String |
globalInfo()
Returns a string describing the kernel |
java.lang.String |
kernelMatrixFileTipText()
Returns the tip text for this property |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
int |
numCacheHits()
Returns the number of dot product cache hits. |
int |
numEvals()
Returns the number of kernel evaluation performed. |
void |
setKernelMatrixFile(java.io.File f)
Sets the file holding the kernel matrix |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
returns a string representation for the Kernel |
| Methods inherited from class weka.classifiers.functions.supportVector.Kernel |
|---|
buildKernel, 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 PrecomputedKernelMatrixKernel()
| Method Detail |
|---|
public java.lang.String globalInfo()
globalInfo in class Kernelpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class Kernel
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-M <file name> The file name of the file that holds the kernel matrix. (default: kernelMatrix.matrix)
setOptions in interface OptionHandlersetOptions in class Kerneloptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Kernel
public double eval(int id1,
int id2,
Instance inst1)
throws java.lang.Exception
Kernel
eval in class Kernelid1 - the index of instance 1id2 - the index of instance 2inst1 - the instance 1 object
java.lang.Exception - if something goes wrongpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class KernelCapabilitiespublic void setKernelMatrixFile(java.io.File f)
value - the exponent valuepublic java.io.File getKernelMatrixFile()
public java.lang.String kernelMatrixFileTipText()
public java.lang.String toString()
toString in class java.lang.Objectpublic void clean()
clean in class Kernelpublic int numEvals()
numEvals in class Kernelpublic int numCacheHits()
numCacheHits in class Kernelpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Kernel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||