public class Nystroem extends SimpleBatchFilter implements TechnicalInformationHandler
@inproceedings{Yang2012,
author = {Tianbao Yang and Yu-Feng Li and Mehrdad Mahdavi and Rong Jin and Zhi-Hua Zhou},
booktitle = {Proc 26th Annual Conference on Neural Information Processing Systems},
pages = {485--493},
title = {Nystr"{o}m Method vs Random Fourier Features: A Theoretical and Empirical Comparison},
year = {2012},
URL = {http://papers.nips.cc/paper/4588-nystrom-method-vs-random-fourier-features-a-theoretical-and-empirical-comparison}
}
-K <kernel specification> The kernel function to use.
-F <filter specification> The filter to use, which should be a filter that takes a sample of instances.
-use-svd Whether to use singular value decomposition instead of eigendecomposition.
-output-debug-info If set, filter is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, filter capabilities are not checked before filter is built (use with caution).
| Modifier and Type | Field and Description |
|---|---|
protected Filter |
m_Filter
The filter to use for sub sampling.
|
protected Kernel |
m_Kernel
The kernel function to use.
|
protected Instances |
m_Sample
Stores the sample used for the approximation.
|
protected boolean |
m_useSVD
Determines whether singular value decomposition is used instead of eigendecomposition.
|
protected no.uib.cipr.matrix.Matrix |
m_WeightingMatrix
Stores the weighting matrix.
|
static double |
SMALL
Constant to avoid division by zero.
|
m_Debug, m_DoNotCheckCapabilities, m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts| Constructor and Description |
|---|
Nystroem()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowAccessToFullInputFormat()
Returns whether to allow the determineOutputFormat(Instances) method access
to the full dataset rather than just the header.
|
protected Instances |
determineOutputFormat(Instances inputFormat)
Determines the output format for the data that is produced by this filter.
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
Filter |
getFilter()
Gets the filter that is used for sub sampling.
|
Kernel |
getKernel()
Returns the kernel to use
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns a reference to the algorithm implemented by this class.
|
boolean |
getUseSVD()
Gets whether to use singular value decomposition instead of eigendecomposition.
|
java.lang.String |
globalInfo()
Provides information regarding this class.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
protected Instances |
process(Instances instances)
Takes a batch of data and transforms it.
|
void |
setFilter(Filter filter)
Sets the filter to use for sub sampling.
|
void |
setKernel(Kernel value)
sets the kernel to use
|
void |
setUseSVD(boolean flag)
Sets whether to use singular value decomposition instead of eigendecomposition.
|
batchFinished, hasImmediateOutputFormat, inputreset, setInputFormatbatchFilterFile, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getInputFormat, getOptions, getOutputFormat, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, listOptions, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOptions, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapperpublic static double SMALL
protected Filter m_Filter
protected Kernel m_Kernel
protected boolean m_useSVD
protected Instances m_Sample
protected no.uib.cipr.matrix.Matrix m_WeightingMatrix
public Nystroem()
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilities@OptionMetadata(displayName="Use SVD and not eigendecomposition", description="Whether to use singular value decomposition instead of eigendecomposition.", displayOrder=3, commandLineParamName="use-svd", commandLineParamSynopsis="-use-svd", commandLineParamIsFlag=true) public boolean getUseSVD()
public void setUseSVD(boolean flag)
flag - true if singular value decomposition is to be used.@OptionMetadata(displayName="Filter for sampling instances", description="The filter to use, which should be a filter that takes a sample of instances.", displayOrder=2, commandLineParamName="F", commandLineParamSynopsis="-F <filter specification>") public Filter getFilter()
public void setFilter(Filter filter)
filter - the filter to usepublic void setKernel(Kernel value)
value - the kernel to use@OptionMetadata(displayName="Kernel function", description="The kernel function to use.", displayOrder=1, commandLineParamName="K", commandLineParamSynopsis="-K <kernel specification>") public Kernel getKernel()
public java.lang.String globalInfo()
globalInfo in class SimpleFilterpublic TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic boolean allowAccessToFullInputFormat()
allowAccessToFullInputFormat in class SimpleBatchFilterprotected Instances determineOutputFormat(Instances inputFormat) throws java.lang.Exception
determineOutputFormat in class SimpleFilterinputFormat - the input format to base the output format onjava.lang.Exception - if a problem occurs when the output format is generatedSimpleFilter.hasImmediateOutputFormat(),
Filter.batchFinished()protected Instances process(Instances instances) throws java.lang.Exception
process in class SimpleFilterinstances - the data to processjava.lang.Exception - is thrown if a problem occursFilter.batchFinished()public java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(java.lang.String[] argv)
argv - should contain arguments to the filter: use -h for help