类 KernelFilter
java.lang.Object
weka.filters.Filter
weka.filters.SimpleFilter
weka.filters.SimpleBatchFilter
weka.filters.unsupervised.attribute.KernelFilter
- 所有已实现的接口:
Serializable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
,UnsupervisedFilter
public class KernelFilter
extends SimpleBatchFilter
implements UnsupervisedFilter, TechnicalInformationHandler
Converts the given set of predictor variables into a kernel matrix. The class value remains unchangedm, as long as the preprocessing filter doesn't change it.
By default, the data is preprocessed with the Center filter, but the user can choose any filter (NB: one must be careful that the filter does not alter the class attribute unintentionally). With weka.filters.AllFilter the preprocessing gets disabled.
For more information regarding preprocessing the data, see:
K.P. Bennett, M.J. Embrechts: An Optimization Perspective on Kernel Partial Least Squares Regression. In: Advances in Learning Theory: Methods, Models and Applications, 227-249, 2003. BibTeX:
By default, the data is preprocessed with the Center filter, but the user can choose any filter (NB: one must be careful that the filter does not alter the class attribute unintentionally). With weka.filters.AllFilter the preprocessing gets disabled.
For more information regarding preprocessing the data, see:
K.P. Bennett, M.J. Embrechts: An Optimization Perspective on Kernel Partial Least Squares Regression. In: Advances in Learning Theory: Methods, Models and Applications, 227-249, 2003. BibTeX:
@inproceedings{Bennett2003, author = {K.P. Bennett and M.J. Embrechts}, booktitle = {Advances in Learning Theory: Methods, Models and Applications}, editor = {J. Suykens et al.}, pages = {227-249}, publisher = {IOS Press, Amsterdam, The Netherlands}, series = {NATO Science Series, Series III: Computer and System Sciences}, title = {An Optimization Perspective on Kernel Partial Least Squares Regression}, volume = {190}, year = {2003} }Valid options are:
-D Turns on output of debugging information.
-no-checks Turns off all checks - use with caution! Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a nominal class. Turning them off also means that no header information will be stored if the machine is linear. Finally, it also assumes that no instance has a weight equal to 0. (default: checks on)
-F <filename> The file to initialize the filter with (optional).
-C <num> The class index for the file to initialize with, First and last are valid (optional, default: last).
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
-kernel-factor Defines a factor for the kernel. - RBFKernel: a factor for gamma Standardize: 1/(2*N) Normalize..: 6/N Available parameters are: N for # of instances, A for # of attributes (default: 1)
-P <classname and parameters> The Filter used for preprocessing (use weka.filters.AllFilter to disable preprocessing). (default: weka.filters.unsupervised.attribute.Center)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-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)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
Options specific to preprocessing filter weka.filters.unsupervised.attribute.Center:
-unset-class-temporarily Unsets the class index temporarily before the filter is applied to the data. (default: no)
- 版本:
- $Revision: 9570 $
- 作者:
- Jonathan Miles (jdm18@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Returns the tip text for this propertyReturns the Capabilities of this filter.boolean
Returns whether the checks are turned off or not.Gets the file to initialize the filter with, can be null.Gets the class index of the file to initialize the filter with.Gets the kernel to use.Gets the expression for the kernel.String[]
Gets the current settings of the filter.Gets the filter used for preprocessingReturns the revision string.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.Returns a string describing this filter.Returns the tip text for this propertyReturns the tip text for this propertyvoid
initFilter
(Instances instances) initializes the filter with the given dataset, i.e., the kernel gets built.Returns the tip text for this propertyReturns the tip text for this propertyReturns an enumeration describing the available options.static void
runs the filter with the given argumentsReturns the tip text for this propertyvoid
setChecksTurnedOff
(boolean value) Disables or enables the checks (which could be time-consuming).void
setInitFile
(File value) Sets the file to initialize the filter with, can be null.void
setInitFileClassIndex
(String value) Sets class index of the file to initialize the filter with.void
Sets the kernel to use.void
setKernelFactorExpression
(String value) Sets the expression for the kernel.void
setOptions
(String[] options) Parses a given list of options.void
setPreprocessing
(Filter value) Sets the filter to use for preprocessing (use the AllFilter for no preprocessing)从类继承的方法 weka.filters.SimpleBatchFilter
batchFinished, input
从类继承的方法 weka.filters.SimpleFilter
debugTipText, getDebug, setDebug, setInputFormat
从类继承的方法 weka.filters.Filter
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper
-
构造器详细资料
-
KernelFilter
public KernelFilter()
-
-
方法详细资料
-
globalInfo
Returns a string describing this filter.- 指定者:
globalInfo
在类中SimpleFilter
- 返回:
- a description of the filter suitable for displaying in the explorer/experimenter gui
-
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.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中SimpleFilter
- 返回:
- an enumeration of all the available options.
-
getOptions
Gets the current settings of the filter.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中SimpleFilter
- 返回:
- an array of strings suitable for passing to setOptions
-
setOptions
Parses a given list of options. Valid options are:-D Turns on output of debugging information.
-no-checks Turns off all checks - use with caution! Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a nominal class. Turning them off also means that no header information will be stored if the machine is linear. Finally, it also assumes that no instance has a weight equal to 0. (default: checks on)
-F <filename> The file to initialize the filter with (optional).
-C <num> The class index for the file to initialize with, First and last are valid (optional, default: last).
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
-kernel-factor Defines a factor for the kernel. - RBFKernel: a factor for gamma Standardize: 1/(2*N) Normalize..: 6/N Available parameters are: N for # of instances, A for # of attributes (default: 1)
-P <classname and parameters> The Filter used for preprocessing (use weka.filters.AllFilter to disable preprocessing). (default: weka.filters.unsupervised.attribute.Center)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-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)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
Options specific to preprocessing filter weka.filters.unsupervised.attribute.Center:
-unset-class-temporarily Unsets the class index temporarily before the filter is applied to the data. (default: no)
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中SimpleFilter
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported- 另请参阅:
-
SimpleFilter.reset()
-
initFileTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getInitFile
Gets the file to initialize the filter with, can be null.- 返回:
- the file
-
setInitFile
Sets the file to initialize the filter with, can be null.- 参数:
value
- the file
-
initFileClassIndexTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getInitFileClassIndex
Gets the class index of the file to initialize the filter with.- 返回:
- the class index
-
setInitFileClassIndex
Sets class index of the file to initialize the filter with.- 参数:
value
- the class index
-
kernelTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getKernel
Gets the kernel to use.- 返回:
- the kernel
-
setKernel
Sets the kernel to use.- 参数:
value
- the kernel
-
setChecksTurnedOff
public void setChecksTurnedOff(boolean value) Disables or enables the checks (which could be time-consuming). Use with caution!- 参数:
value
- if true turns off all checks
-
getChecksTurnedOff
public boolean getChecksTurnedOff()Returns whether the checks are turned off or not.- 返回:
- true if the checks are turned off
-
checksTurnedOffTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
kernelFactorExpressionTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getKernelFactorExpression
Gets the expression for the kernel.- 返回:
- the expression
-
setKernelFactorExpression
Sets the expression for the kernel.- 参数:
value
- the file
-
preprocessingTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setPreprocessing
Sets the filter to use for preprocessing (use the AllFilter for no preprocessing)- 参数:
value
- the preprocessing filter
-
getPreprocessing
Gets the filter used for preprocessing- 返回:
- the current preprocessing filter.
-
initFilter
initializes the filter with the given dataset, i.e., the kernel gets built. Needs to be called before the first call of Filter.useFilter or batchFinished(), if not the -F option (or setInitFile(File) is used).- 参数:
instances
- the data to initialize with- 抛出:
Exception
- if building of kernel fails
-
getCapabilities
Returns the Capabilities of this filter.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Filter
- 返回:
- the capabilities of this object
- 另请参阅:
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Filter
- 返回:
- the revision
-
main
runs the filter with the given arguments- 参数:
args
- the commandline arguments
-