Class PolyKernel
java.lang.Object
weka.classifiers.functions.supportVector.Kernel
weka.classifiers.functions.supportVector.CachedKernel
weka.classifiers.functions.supportVector.PolyKernel
- All Implemented Interfaces:
Serializable,CapabilitiesHandler,OptionHandler,RevisionHandler
- Direct Known Subclasses:
NormalizedPolyKernel
The polynomial kernel : K(x, y) = <x, y>^p or
K(x, y) = (<x, y>+1)^p
Valid options are:
-D Enables debugging output (if available) to be printed. (default: off)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
- Version:
- $Revision: 14534 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz), Shane Legg (shane@intelligenesis.net) (sparse vector code), Stuart Inglis (stuart@reeltwo.com) (sparse vector code)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptiondefault constructor - does nothing.PolyKernel(Instances data, int cacheSize, double exponent, boolean lowerOrder) Creates a newPolyKernelinstance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the tip text for this propertyReturns the Capabilities of this kernel.doubleGets the exponent value.String[]Gets the current settings of the Kernel.Returns the revision string.booleanGets whether lower-order terms are used.Returns a string describing the kernelReturns an enumeration describing the available options.voidsetExponent(double value) Sets the exponent value.voidsetOptions(String[] options) Parses a given list of options.voidsetUseLowerOrder(boolean value) Sets whether to use lower-order terms.toString()returns a string representation for the KernelReturns the tip text for this propertyMethods inherited from class weka.classifiers.functions.supportVector.CachedKernel
buildKernel, cacheSizeTipText, clean, eval, getCacheSize, numCacheHits, numEvals, setCacheSizeMethods inherited from class weka.classifiers.functions.supportVector.Kernel
debugTipText, forName, getChecksTurnedOff, getDebug, getDoNotCheckCapabilities, makeCopies, makeCopy, setChecksTurnedOff, setDebug, setDoNotCheckCapabilities
-
Constructor Details
-
PolyKernel
public PolyKernel()default constructor - does nothing. -
PolyKernel
public PolyKernel(Instances data, int cacheSize, double exponent, boolean lowerOrder) throws Exception Creates a newPolyKernelinstance.- Parameters:
data- the training dataset used.cacheSize- the size of the cache (a prime number)exponent- the exponent to uselowerOrder- whether to use lower-order terms- 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)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
- 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
-
getCapabilities
Returns the Capabilities of this kernel.- Specified by:
getCapabilitiesin interfaceCapabilitiesHandler- Overrides:
getCapabilitiesin classKernel- Returns:
- the capabilities of this object
- See Also:
-
setExponent
public void setExponent(double value) Sets the exponent value.- Parameters:
value- the exponent value
-
getExponent
public double getExponent()Gets the exponent value.- Returns:
- the exponent value
-
exponentTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setUseLowerOrder
public void setUseLowerOrder(boolean value) Sets whether to use lower-order terms.- Parameters:
value- true if lower-order terms will be used
-
getUseLowerOrder
public boolean getUseLowerOrder()Gets whether lower-order terms are used.- Returns:
- true if lower-order terms are used
-
useLowerOrderTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
toString
returns a string representation for the Kernel -
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classKernel- Returns:
- the revision
-