public class Wavelet extends SimpleBatchFilter implements TechnicalInformationHandler
@misc{Wikipedia2004, author = {Wikipedia}, title = {Discrete wavelet transform}, year = {2004}, HTTP = {http://en.wikipedia.org/wiki/Discrete_wavelet_transform} } @misc{Sandberg2000, address = {University of Colorado at Boulder, USA}, author = {Kristian Sandberg}, institution = {Dept. of Applied Mathematics}, title = {The Haar wavelet transform}, year = {2000}, HTTP = {http://amath.colorado.edu/courses/5720/2000Spr/Labs/Haar/haar.html} }Valid options are:
-D Turns on output of debugging information.
-A <Haar> The algorithm to use. (default: HAAR)
-P <Zero> The padding to use. (default: ZERO)
-F <filter specification> The filter to use as preprocessing step (classname and options). (default: MultiFilter with ReplaceMissingValues and Normalize)
Options specific to filter weka.filters.MultiFilter ('-F'):
-D Turns on output of debugging information.
-F <classname [options]> A filter to apply (can be specified multiple times).
Modifier and Type | Field and Description |
---|---|
static int |
ALGORITHM_HAAR
the type of algorithm: Haar wavelet
|
protected int |
m_Algorithm
the type of algorithm
|
protected Filter |
m_Filter
an optional filter for preprocessing of the data
|
protected int |
m_Padding
the type of padding
|
static int |
PADDING_ZERO
the type of padding: Zero padding
|
static Tag[] |
TAGS_ALGORITHM
the types of algorithm
|
static Tag[] |
TAGS_PADDING
the types of padding
|
m_Debug
m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts
Constructor and Description |
---|
Wavelet()
default constructor
|
Modifier and Type | Method and Description |
---|---|
String |
algorithmTipText()
Returns the tip text for this property
|
protected Instances |
determineOutputFormat(Instances inputFormat)
Determines the output format based on the input format and returns
this.
|
String |
filterTipText()
Returns the tip text for this property
|
SelectedTag |
getAlgorithm()
Gets the type of algorithm to use
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
Filter |
getFilter()
Get the preprocessing filter.
|
String[] |
getOptions()
returns the options of the current setup
|
SelectedTag |
getPadding()
Gets the type of Padding to use
|
String |
getRevision()
Returns the revision string.
|
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 this classifier.
|
Enumeration |
listOptions()
Gets an enumeration describing the available options.
|
static void |
main(String[] args)
runs the filter with the given arguments
|
protected static int |
nextPowerOf2(int n)
returns the next bigger number that's a power of 2.
|
protected Instances |
pad(Instances data)
pads the data to conform to the necessary number of attributes
|
String |
paddingTipText()
Returns the tip text for this property
|
protected Instances |
process(Instances instances)
Processes the given data (may change the provided dataset) and returns
the modified version.
|
protected Instances |
processHAAR(Instances instances)
processes the instances using the HAAR algorithm
|
void |
setAlgorithm(SelectedTag value)
Sets the type of algorithm to use
|
void |
setFilter(Filter value)
Set the preprocessing filter (only used for setup).
|
void |
setOptions(String[] options)
Parses the options for this object.
|
void |
setPadding(SelectedTag value)
Sets the type of Padding to use
|
batchFinished, hasImmediateOutputFormat, input
debugTipText, getDebug, reset, setDebug, setInputFormat
batchFilterFile, bufferInput, copyValues, copyValues, filterFile, flushInput, getCapabilities, getInputFormat, getOutputFormat, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputFormatPeek, outputPeek, push, resetQueue, runFilter, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
public static final int ALGORITHM_HAAR
public static final Tag[] TAGS_ALGORITHM
public static final int PADDING_ZERO
public static final Tag[] TAGS_PADDING
protected Filter m_Filter
protected int m_Algorithm
protected int m_Padding
public String globalInfo()
globalInfo
in class SimpleFilter
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class SimpleFilter
public String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class SimpleFilter
public void setOptions(String[] options) throws Exception
-D Turns on output of debugging information.
-A <Haar> The algorithm to use. (default: HAAR)
-P <Zero> The padding to use. (default: ZERO)
-F <filter specification> The filter to use as preprocessing step (classname and options). (default: MultiFilter with ReplaceMissingValues and Normalize)
Options specific to filter weka.filters.MultiFilter ('-F'):
-D Turns on output of debugging information.
-F <classname [options]> A filter to apply (can be specified multiple times).
setOptions
in interface OptionHandler
setOptions
in class SimpleFilter
options
- the options to useException
- if the option setting failsSimpleFilter.reset()
public String filterTipText()
public void setFilter(Filter value)
value
- the preprocessing filter.public Filter getFilter()
public String algorithmTipText()
public void setAlgorithm(SelectedTag value)
value
- the algorithm typepublic SelectedTag getAlgorithm()
public String paddingTipText()
public void setPadding(SelectedTag value)
value
- the Padding typepublic SelectedTag getPadding()
protected static int nextPowerOf2(int n)
n
- the number to start fromprotected Instances pad(Instances data)
data
- the data to padprotected Instances determineOutputFormat(Instances inputFormat) throws Exception
determineOutputFormat
in class SimpleFilter
inputFormat
- the input format to base the output format onException
- in case the determination goes wrongSimpleBatchFilter.hasImmediateOutputFormat()
,
SimpleBatchFilter.batchFinished()
protected Instances processHAAR(Instances instances) throws Exception
instances
- the data to processException
- in case the processing goes wrongpublic Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Filter
Capabilities
protected Instances process(Instances instances) throws Exception
process
in class SimpleFilter
instances
- the data to processException
- in case the processing goes wrongSimpleBatchFilter.batchFinished()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Filter
public static void main(String[] args)
args
- the commandline argumentsCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.