| java.lang.Object weka.classifiers.functions.supportVector.Kernel weka.classifiers.functions.supportVector.CachedKernel weka.classifiers.functions.supportVector.PolyKernel
All known Subclasses: weka.classifiers.functions.supportVector.NormalizedPolyKernel, weka.classifiers.mi.supportVector.MIPolyKernel,
PolyKernel | public class PolyKernel extends CachedKernel (Code) | |
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)
-no-checks
Turns off all checks - use with caution!
(default: checks on)
-C <num>
The size of the cache (a prime number).
(default: 250007)
-E <num>
The Exponent to use.
(default: 1.0)
-L
Use lower-order terms.
(default: no)
author: Eibe Frank (eibe@cs.waikato.ac.nz) author: Shane Legg (shane@intelligenesis.net) (sparse vector code) author: Stuart Inglis (stuart@reeltwo.com) (sparse vector code) version: $Revision: 1.6 $ |
Constructor Summary | |
public | PolyKernel() default constructor - does nothing. | public | PolyKernel(Instances data, int cacheSize, double exponent, boolean lowerOrder) Creates a new PolyKernel instance. |
m_exponent | protected double m_exponent(Code) | | The exponent for the polynomial kernel.
|
m_lowerOrder | protected boolean m_lowerOrder(Code) | | Use lower-order terms?
|
serialVersionUID | final static long serialVersionUID(Code) | | for serialization
|
PolyKernel | public PolyKernel()(Code) | | default constructor - does nothing.
|
PolyKernel | public PolyKernel(Instances data, int cacheSize, double exponent, boolean lowerOrder) throws Exception(Code) | | Creates a new PolyKernel instance.
Parameters: data - the training dataset used. Parameters: cacheSize - the size of the cache (a prime number) Parameters: exponent - the exponent to use Parameters: lowerOrder - whether to use lower-order terms throws: Exception - if something goes wrong |
evaluate | protected double evaluate(int id1, int id2, Instance inst1) throws Exception(Code) | | Parameters: id1 - the index of instance 1 Parameters: id2 - the index of instance 2 Parameters: inst1 - the instance 1 object the dot product throws: Exception - if something goes wrong |
exponentTipText | public String exponentTipText()(Code) | | Returns the tip text for this property
tip text for this property suitable fordisplaying in the explorer/experimenter gui |
getCapabilities | public Capabilities getCapabilities()(Code) | | Returns the Capabilities of this kernel.
the capabilities of this object See Also: Capabilities |
getExponent | public double getExponent()(Code) | | Gets the exponent value.
the exponent value |
getOptions | public String[] getOptions()(Code) | | Gets the current settings of the Kernel.
an array of strings suitable for passing to setOptions |
getUseLowerOrder | public boolean getUseLowerOrder()(Code) | | Gets whether lower-order terms are used.
true if lower-order terms are used |
globalInfo | public String globalInfo()(Code) | | Returns a string describing the kernel
a description suitable for displaying in theexplorer/experimenter gui |
listOptions | public Enumeration listOptions()(Code) | | Returns an enumeration describing the available options.
an enumeration of all the available options. |
setExponent | public void setExponent(double value)(Code) | | Sets the exponent value.
Parameters: value - the exponent value |
setOptions | public void setOptions(String[] options) throws Exception(Code) | | 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).
(default: 250007)
-E <num>
The Exponent to use.
(default: 1.0)
-L
Use lower-order terms.
(default: no)
Parameters: options - the list of options as an array of strings throws: Exception - if an option is not supported |
setUseLowerOrder | public void setUseLowerOrder(boolean value)(Code) | | Sets whether to use lower-order terms.
Parameters: value - true if lower-order terms will be used |
toString | public String toString()(Code) | | returns a string representation for the Kernel
a string representaiton of the kernel |
useLowerOrderTipText | public String useLowerOrderTipText()(Code) | | Returns the tip text for this property
tip text for this property suitable fordisplaying in the explorer/experimenter gui |
|
|