类 CachedKernel
java.lang.Object
weka.classifiers.functions.supportVector.Kernel
weka.classifiers.functions.supportVector.CachedKernel
- 所有已实现的接口:
Serializable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
- 直接已知子类:
PolyKernel
,Puk
,RBFKernel
Base class for RBFKernel and PolyKernel that implements a simple LRU.
(least-recently-used) cache if the cache size is set to a value > 0.
Otherwise it uses a full cache.
- 版本:
- $Revision: 4549 $
- 作者:
- 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), Steven Hugg (hugg@fasterlight.com) (refactored, LRU cache), Bernhard Pfahringer (bernhard@cs.waikato.ac.nz) (full cache)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildKernel
(Instances data) builds the kernel with the given data.Returns the tip text for this propertyvoid
clean()
Frees the cache used by the kernel.double
Implements the abstract function of Kernel using the cache.int
Gets the size of the cacheString[]
Gets the current settings of the Kernel.Returns an enumeration describing the available options.int
Returns the number of cache hits on dot products.int
numEvals()
Returns the number of time Eval has been called.void
setCacheSize
(int value) Sets the size of the cache to use (a prime number)void
setOptions
(String[] options) Parses a given list of options.从类继承的方法 weka.classifiers.functions.supportVector.Kernel
checksTurnedOffTipText, debugTipText, forName, getCapabilities, getChecksTurnedOff, getDebug, getRevision, globalInfo, makeCopies, makeCopy, setChecksTurnedOff, setDebug
-
构造器详细资料
-
CachedKernel
public CachedKernel()default constructor - does nothing.
-
-
方法详细资料
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Kernel
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options.- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中Kernel
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the Kernel.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Kernel
- 返回:
- an array of strings suitable for passing to setOptions
-
eval
Implements the abstract function of Kernel using the cache. This method uses the evaluate() method to do the actual dot product. -
numEvals
public int numEvals()Returns the number of time Eval has been called. -
numCacheHits
public int numCacheHits()Returns the number of cache hits on dot products.- 指定者:
numCacheHits
在类中Kernel
- 返回:
- the number of cache hits.
-
clean
public void clean()Frees the cache used by the kernel. -
setCacheSize
public void setCacheSize(int value) Sets the size of the cache to use (a prime number)- 参数:
value
- the size of the cache
-
getCacheSize
public int getCacheSize()Gets the size of the cache- 返回:
- the cache size
-
cacheSizeTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
buildKernel
builds the kernel with the given data. Initializes the kernel cache. The actual size of the cache in bytes is (64 * cacheSize).- 覆盖:
buildKernel
在类中Kernel
- 参数:
data
- the data to base the kernel on- 抛出:
Exception
- if something goes wrong
-