public class Puk extends CachedKernel implements TechnicalInformationHandler
-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)
-O <num> The Omega parameter. (default: 1.0)
-S <num> The Sigma parameter. (default: 1.0)
Modifier and Type | Field and Description |
---|---|
protected double |
m_factor
Cached factor for the Puk kernel.
|
protected double[] |
m_kernelPrecalc
The precalculated dotproducts of <inst_i,inst_i>
|
protected double |
m_omega
Omega for the Puk kernel.
|
protected double |
m_sigma
Sigma for the Puk kernel.
|
m_cacheHits, m_cacheSize, m_cacheSlots, m_kernelEvals, m_kernelMatrix, m_keys, m_numInsts, m_storage
m_ChecksTurnedOff, m_data, m_Debug
Constructor and Description |
---|
Puk()
default constructor - does nothing.
|
Puk(Instances data,
int cacheSize,
double omega,
double sigma)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildKernel(Instances data)
builds the kernel with the given data.
|
protected double |
computeFactor(double omega,
double sigma)
computes the factor for curve-fitting (see equation (13) in paper)
|
protected double |
evaluate(int id1,
int id2,
Instance inst1)
returns the dot product
|
Capabilities |
getCapabilities()
Returns the Capabilities of this kernel.
|
double |
getOmega()
Gets the omega value.
|
String[] |
getOptions()
Gets the current settings of the Kernel.
|
String |
getRevision()
Returns the revision string.
|
double |
getSigma()
Gets the sigma value.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
String |
globalInfo()
Returns a string describing the kernel
|
protected void |
initVars(Instances data)
initializes variables etc.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
String |
omegaTipText()
Returns the tip text for this property
|
void |
setOmega(double value)
Sets the omega value.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setSigma(double value)
Sets the sigma value.
|
String |
sigmaTipText()
Returns the tip text for this property
|
String |
toString()
returns a string representation for the Kernel
|
cacheSizeTipText, clean, dotProd, eval, getCacheSize, numCacheHits, numEvals, setCacheSize
checksTurnedOffTipText, debugTipText, forName, getChecksTurnedOff, getDebug, makeCopies, makeCopy, setChecksTurnedOff, setDebug
protected double[] m_kernelPrecalc
protected double m_omega
protected double m_sigma
protected double m_factor
public String globalInfo()
globalInfo
in class Kernel
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class CachedKernel
public void setOptions(String[] options) throws Exception
-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)
-O <num> The Omega parameter. (default: 1.0)
-S <num> The Sigma parameter. (default: 1.0)
setOptions
in interface OptionHandler
setOptions
in class CachedKernel
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class CachedKernel
protected double evaluate(int id1, int id2, Instance inst1) throws Exception
evaluate
in class CachedKernel
id1
- the index of instance 1id2
- the index of instance 2inst1
- the instance 1 objectException
- if something goes wrongpublic void setOmega(double value)
value
- the omega valuepublic double getOmega()
public String omegaTipText()
public void setSigma(double value)
value
- the sigma valuepublic double getSigma()
public String sigmaTipText()
protected double computeFactor(double omega, double sigma)
omega
- the omega to usesigma
- the sigma to useprotected void initVars(Instances data)
initVars
in class CachedKernel
data
- the data to usepublic Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Kernel
Capabilities
public void buildKernel(Instances data) throws Exception
buildKernel
in class CachedKernel
data
- the data to base the kernel onException
- if something goes wrongpublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Kernel
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.