|
||||||||||
| 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. |
File |
getKernelMatrixFile()
Gets the file containing the kernel matrix. |
String[] |
getOptions()
Gets the current settings of the Kernel. |
String |
getRevision()
Returns the revision string. |
String |
globalInfo()
Returns a string describing the kernel |
String |
kernelMatrixFileTipText()
Returns the tip text for this property |
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(File f)
Sets the file holding the kernel matrix |
void |
setOptions(String[] options)
Parses a given list of options. |
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 String globalInfo()
globalInfo in class Kernelpublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class Kernel
public void setOptions(String[] options)
throws 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
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Kernel
public double eval(int id1,
int id2,
Instance inst1)
throws Exception
Kernel
eval in class Kernelid1 - the index of instance 1id2 - the index of instance 2inst1 - the instance 1 object
Exception - if something goes wrongpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class KernelCapabilitiespublic void setKernelMatrixFile(File f)
f - the file holding the matrixpublic File getKernelMatrixFile()
public String kernelMatrixFileTipText()
public String toString()
toString in class Objectpublic void clean()
clean in class Kernelpublic int numEvals()
numEvals in class Kernelpublic int numCacheHits()
numCacheHits in class Kernelpublic 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 | |||||||||