public abstract class SimpleFilter extends Filter implements OptionHandler
SimpleBatchFilter,
SimpleStreamFilter,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_Debug
Whether debugging is on
|
m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts| Constructor and Description |
|---|
SimpleFilter() |
| Modifier and Type | Method and Description |
|---|---|
String |
debugTipText()
Returns the tip text for this property
|
protected abstract Instances |
determineOutputFormat(Instances inputFormat)
Determines the output format based on the input format and returns
this.
|
boolean |
getDebug()
Returns the current debugging mode state.
|
String[] |
getOptions()
Gets the current settings of the filter.
|
abstract String |
globalInfo()
Returns a string describing this classifier.
|
protected abstract boolean |
hasImmediateOutputFormat()
returns true if the output format is immediately available after the
input format has been set and not only after all the data has been
seen (see batchFinished())
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
protected abstract Instances |
process(Instances instances)
Processes the given data (may change the provided dataset) and returns
the modified version.
|
protected void |
reset()
resets the filter, i.e., m_NewBatch to true and m_FirstBatchDone to
false.
|
void |
setDebug(boolean value)
Sets the debugging mode
|
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances.
|
void |
setOptions(String[] options)
Parses a list of options for this object.
|
batchFilterFile, batchFinished, bufferInput, copyValues, copyValues, filterFile, flushInput, getCapabilities, getCapabilities, getInputFormat, getOutputFormat, getRevision, initInputLocators, initOutputLocators, input, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, main, makeCopies, makeCopy, numPendingOutput, output, outputFormatPeek, outputPeek, push, resetQueue, runFilter, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapperpublic abstract String globalInfo()
public Enumeration listOptions()
listOptions in interface OptionHandlerpublic void setOptions(String[] options) throws Exception
setOptions in interface OptionHandleroptions - the list of options as an array of stringsException - if an option is not supportedreset()public String[] getOptions()
getOptions in interface OptionHandlerpublic void setDebug(boolean value)
value - if true, debugging information is outputpublic boolean getDebug()
public String debugTipText()
protected void reset()
Filter.m_NewBatch,
Filter.m_FirstBatchDoneprotected abstract boolean hasImmediateOutputFormat()
Filter.batchFinished(),
setInputFormat(Instances)protected abstract Instances determineOutputFormat(Instances inputFormat) throws Exception
inputFormat - the input format to base the output format onException - in case the determination goes wronghasImmediateOutputFormat(),
Filter.batchFinished()protected abstract Instances process(Instances instances) throws Exception
instances - the data to processException - in case the processing goes wrongFilter.batchFinished()public boolean setInputFormat(Instances instanceInfo) throws Exception
setInputFormat in class FilterinstanceInfo - an Instances object containing the input instance
structure (any instances contained in the object
are ignored - only the structure is required).Exception - if the inputFormat can't be set successfullyreset()Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.