Class RBFKernel
java.lang.Object
weka.classifiers.functions.supportVector.Kernel
weka.classifiers.functions.supportVector.CachedKernel
weka.classifiers.functions.supportVector.RBFKernel
- All Implemented Interfaces:
Serializable,CapabilitiesHandler,OptionHandler,RevisionHandler
- Direct Known Subclasses:
MIRBFKernel
The RBF kernel. K(x, y) = e^-(gamma * <x-y, x-y>^2)
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)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-G <num> The Gamma parameter. (default: 0.01)
- Version:
- $Revision: 5518 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz), Shane Legg (shane@intelligenesis.net) (sparse vector code), Stuart Inglis (stuart@reeltwo.com) (sparse vector code), J. Lindgren (jtlindgr{at}cs.helsinki.fi) (RBF kernel)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildKernel(Instances data) builds the kernel with the given data.Returns the tip text for this propertyReturns the Capabilities of this kernel.doublegetGamma()Gets the gamma value.String[]Gets the current settings of the Kernel.Returns the revision string.Returns a string describing the kernelReturns an enumeration describing the available options.voidsetGamma(double value) Sets the gamma value.voidsetOptions(String[] options) Parses a given list of options.toString()returns a string representation for the KernelMethods inherited from class weka.classifiers.functions.supportVector.CachedKernel
cacheSizeTipText, clean, eval, getCacheSize, numCacheHits, numEvals, setCacheSizeMethods inherited from class weka.classifiers.functions.supportVector.Kernel
checksTurnedOffTipText, debugTipText, forName, getChecksTurnedOff, getDebug, makeCopies, makeCopy, setChecksTurnedOff, setDebug
-
Constructor Details
-
RBFKernel
public RBFKernel()default constructor - does nothing. -
RBFKernel
Constructor. Initializes m_kernelPrecalc[].- Parameters:
data- the data to usecacheSize- the size of the cachegamma- the bandwidth- Throws:
Exception- if something goes wrong
-
-
Method Details
-
globalInfo
Returns a string describing the kernel- Specified by:
globalInfoin classKernel- Returns:
- a description suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- Specified by:
listOptionsin interfaceOptionHandler- Overrides:
listOptionsin classCachedKernel- Returns:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. 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)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-G <num> The Gamma parameter. (default: 0.01)
- Specified by:
setOptionsin interfaceOptionHandler- Overrides:
setOptionsin classCachedKernel- Parameters:
options- the list of options as an array of strings- Throws:
Exception- if an option is not supported
-
getOptions
Gets the current settings of the Kernel.- Specified by:
getOptionsin interfaceOptionHandler- Overrides:
getOptionsin classCachedKernel- Returns:
- an array of strings suitable for passing to setOptions
-
setGamma
public void setGamma(double value) Sets the gamma value.- Parameters:
value- the gamma value
-
getGamma
public double getGamma()Gets the gamma value.- Returns:
- the gamma value
-
gammaTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getCapabilities
Returns the Capabilities of this kernel.- Specified by:
getCapabilitiesin interfaceCapabilitiesHandler- Overrides:
getCapabilitiesin classKernel- Returns:
- the capabilities of this object
- See Also:
-
buildKernel
builds the kernel with the given data. Initializes the kernel cache. The actual size of the cache in bytes is (64 * cacheSize).- Overrides:
buildKernelin classCachedKernel- Parameters:
data- the data to base the kernel on- Throws:
Exception- if something goes wrong
-
toString
returns a string representation for the Kernel -
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classKernel- Returns:
- the revision
-