public class RBFKernel extends CachedKernel
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-G <double> The value to use for the gamma parameter (default: 0.01).
-output-debug-info Enables debugging output (if available) to be printed. (default: off)
| Modifier and Type | Field and Description |
|---|---|
protected double |
m_gamma
The gamma parameter for the RBF kernel.
|
protected double[] |
m_kernelPrecalc
The diagonal values of the dot product matrix (name needs to be consistent with J.
|
m_cacheHits, m_cacheSize, m_cacheSlots, m_kernelEvals, m_kernelMatrix, m_keys, m_numInsts, m_storagem_ChecksTurnedOff, m_data, m_Debug, m_DoNotCheckCapabilities| Constructor and Description |
|---|
RBFKernel()
default constructor - does nothing.
|
RBFKernel(Instances data,
int cacheSize,
double gamma)
Creates a new
RBFKernel instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
buildKernel(Instances data)
Builds the kernel.
|
protected double |
evaluate(int id1,
int id2,
Instance inst1)
This method is overridden in subclasses to implement specific kernels.
|
java.lang.String |
gammaTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns the Capabilities of this kernel.
|
double |
getGamma()
Gets the gamma value.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing the kernel
|
void |
setGamma(double value)
Sets the gamma value.
|
java.lang.String |
toString()
returns a string representation for the Kernel
|
cacheSizeTipText, clean, dotProd, eval, getCacheSize, getOptions, initVars, listOptions, numCacheHits, numEvals, setCacheSize, setOptionsdebugTipText, forName, getChecksTurnedOff, getDebug, getDoNotCheckCapabilities, makeCopies, makeCopy, setChecksTurnedOff, setDebug, setDoNotCheckCapabilitiesprotected double m_gamma
protected double[] m_kernelPrecalc
public RBFKernel()
public RBFKernel(Instances data, int cacheSize, double gamma) throws java.lang.Exception
RBFKernel instance.data - the training dataset used.cacheSize - the size of the cache (a prime number)gamma - the gamma to usejava.lang.Exception - if something goes wrongpublic void buildKernel(Instances data) throws java.lang.Exception
buildKernel in class CachedKerneldata - the data to base the kernel onjava.lang.Exception - if something goes wrongpublic java.lang.String globalInfo()
globalInfo in class Kernelprotected double evaluate(int id1,
int id2,
Instance inst1)
throws java.lang.Exception
CachedKernelevaluate in class CachedKernelid1 - the index of instance 1id2 - the index of instance 2inst1 - the instance 1 objectjava.lang.Exception - if something goes wrongpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class KernelCapabilities@OptionMetadata(description="The value to use for the gamma parameter (default: 0.01).", displayName="gamma", commandLineParamName="G", commandLineParamSynopsis="-G <double>", displayOrder=1) public void setGamma(double value)
value - the gamma valuepublic double getGamma()
public java.lang.String gammaTipText()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Kernel