|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.functions.supportVector.Kernel
public abstract class Kernel
Abstract kernel. Kernels implementing this class must respect Mercer's condition in order to ensure a correct behaviour of SMOreg.
Constructor Summary | |
---|---|
Kernel()
|
Method Summary | |
---|---|
void |
buildKernel(Instances data)
builds the kernel with the given data |
java.lang.String |
checksTurnedOffTipText()
Returns the tip text for this property |
abstract void |
clean()
Frees the memory used by the kernel. |
java.lang.String |
debugTipText()
Returns the tip text for this property |
abstract double |
eval(int id1,
int id2,
Instance inst1)
Computes the result of the kernel function for two instances. |
static Kernel |
forName(java.lang.String kernelName,
java.lang.String[] options)
Creates a new instance of a kernel given it's class name and (optional) arguments to pass to it's setOptions method. |
Capabilities |
getCapabilities()
Returns the Capabilities of this kernel. |
boolean |
getChecksTurnedOff()
Returns whether the checks are turned off or not. |
boolean |
getDebug()
Gets whether debugging output is turned on or not. |
java.lang.String[] |
getOptions()
Gets the current settings of the Kernel. |
abstract java.lang.String |
globalInfo()
Returns a string describing the kernel |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static Kernel[] |
makeCopies(Kernel model,
int num)
Creates a given number of deep copies of the given kernel using serialization. |
static Kernel |
makeCopy(Kernel kernel)
Creates a deep copy of the given kernel using serialization. |
abstract int |
numCacheHits()
Returns the number of dot product cache hits. |
abstract int |
numEvals()
Returns the number of kernel evaluation performed. |
void |
setChecksTurnedOff(boolean value)
Disables or enables the checks (which could be time-consuming). |
void |
setDebug(boolean value)
Enables or disables the output of debug information (if the derived kernel supports that) |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface weka.core.RevisionHandler |
---|
getRevision |
Constructor Detail |
---|
public Kernel()
Method Detail |
---|
public abstract java.lang.String globalInfo()
public abstract double eval(int id1, int id2, Instance inst1) throws java.lang.Exception
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 abstract void clean()
public abstract int numEvals()
public abstract int numCacheHits()
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
options
- 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 OptionHandler
public void setDebug(boolean value)
value
- whether to output debugging informationpublic boolean getDebug()
public java.lang.String debugTipText()
public void setChecksTurnedOff(boolean value)
value
- if true turns off all checkspublic boolean getChecksTurnedOff()
public java.lang.String checksTurnedOffTipText()
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
Capabilities
public void buildKernel(Instances data) throws java.lang.Exception
data
- the data to base the kernel on
java.lang.Exception
- if something goes wrongpublic static Kernel makeCopy(Kernel kernel) throws java.lang.Exception
kernel
- the kernel to copy
java.lang.Exception
- if an error occurspublic static Kernel[] makeCopies(Kernel model, int num) throws java.lang.Exception
model
- the kernel to copynum
- the number of kernel copies to create.
java.lang.Exception
- if an error occurspublic static Kernel forName(java.lang.String kernelName, java.lang.String[] options) throws java.lang.Exception
kernelName
- the fully qualified class name of the classifieroptions
- an array of options suitable for passing to setOptions. May
be null.
java.lang.Exception
- if the classifier name is invalid, or the options
supplied are not acceptable to the classifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |