public abstract class SimpleFilter extends Filter
SimpleBatchFilter,
SimpleStreamFilter,
Serialized Formm_Debug, m_DoNotCheckCapabilities, m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts| Constructor and Description |
|---|
SimpleFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Instances |
determineOutputFormat(Instances inputFormat)
Determines the output format based on the input format and returns this.
|
abstract java.lang.String |
globalInfo()
Returns a string describing this filter.
|
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())
|
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.
|
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances.
|
batchFilterFile, batchFinished, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getInputFormat, getOptions, getOutputFormat, getRevision, initInputLocators, initOutputLocators, input, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, listOptions, main, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOptions, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapperpublic abstract java.lang.String globalInfo()
protected void reset()
Filter.m_NewBatch,
Filter.m_FirstBatchDoneprotected abstract boolean hasImmediateOutputFormat()
Filter.batchFinished(),
setInputFormat(Instances)protected abstract Instances determineOutputFormat(Instances inputFormat) throws java.lang.Exception
inputFormat - the input format to base the output format onjava.lang.Exception - in case the determination goes wronghasImmediateOutputFormat(),
Filter.batchFinished()protected abstract Instances process(Instances instances) throws java.lang.Exception
instances - the data to processjava.lang.Exception - in case the processing goes wrongFilter.batchFinished()public boolean setInputFormat(Instances instanceInfo) throws java.lang.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).java.lang.Exception - if the inputFormat can't be set successfullyreset()