MultiFilter (original) (raw)
java.lang.Object
- weka.filters.Filter
- weka.filters.SimpleFilter
- weka.filters.SimpleStreamFilter
* * weka.filters.MultiFilter
- weka.filters.SimpleStreamFilter
- weka.filters.SimpleFilter
All Implemented Interfaces:
java.io.Serializable, CapabilitiesHandler, OptionHandler, RevisionHandler, StreamableFilter
public class MultiFilter
extends SimpleStreamFilter
Applies several filters successively. In case all supplied filters are StreamableFilters, it will act as a streamable one, too.
Valid options are:
-D
Turns on output of debugging information.
-F <classname [options]>
A filter to apply (can be specified multiple times).
Version: Revision:9718Revision: 9718 Revision:9718
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
StreamableFilter, Serialized Form
Constructor Summary
Constructors
Constructor and Description MultiFilter() Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type Method and Description boolean batchFinished() Signify that this batch of input to the filter is finished. java.lang.String filtersTipText() Returns the tip text for this property Capabilities getCapabilities() Returns the Capabilities of this filter. Filter getFilter(int index) Gets a single filter from the set of available filters. Filter[] getFilters() Gets the list of possible filters to choose from. java.lang.String[] getOptions() Gets the current settings of the filter. java.lang.String getRevision() Returns the revision string. java.lang.String globalInfo() Returns a string describing this filter boolean isStreamableFilter() tests whether all the enclosed filters are streamable java.util.Enumeration listOptions() Returns an enumeration describing the available options. static void main(java.lang.String[] args) Main method for executing this class. void setFilters(Filter[] filters) Sets the list of possible filters to choose from. void setOptions(java.lang.String[] options) Parses a list of options for this object. * ### Methods inherited from class weka.filters.[SimpleStreamFilter](../../weka/filters/SimpleStreamFilter.html "class in weka.filters") `[input](../../weka/filters/SimpleStreamFilter.html#input-weka.core.Instance-)` * ### Methods inherited from class weka.filters.[SimpleFilter](../../weka/filters/SimpleFilter.html "class in weka.filters") `[debugTipText](../../weka/filters/SimpleFilter.html#debugTipText--), [getDebug](../../weka/filters/SimpleFilter.html#getDebug--), [setDebug](../../weka/filters/SimpleFilter.html#setDebug-boolean-), [setInputFormat](../../weka/filters/SimpleFilter.html#setInputFormat-weka.core.Instances-)` * ### Methods inherited from class weka.filters.[Filter](../../weka/filters/Filter.html "class in weka.filters") `[batchFilterFile](../../weka/filters/Filter.html#batchFilterFile-weka.filters.Filter-java.lang.String:A-), [filterFile](../../weka/filters/Filter.html#filterFile-weka.filters.Filter-java.lang.String:A-), [getCapabilities](../../weka/filters/Filter.html#getCapabilities-weka.core.Instances-), [getOutputFormat](../../weka/filters/Filter.html#getOutputFormat--), [isFirstBatchDone](../../weka/filters/Filter.html#isFirstBatchDone--), [isNewBatch](../../weka/filters/Filter.html#isNewBatch--), [isOutputFormatDefined](../../weka/filters/Filter.html#isOutputFormatDefined--), [makeCopies](../../weka/filters/Filter.html#makeCopies-weka.filters.Filter-int-), [makeCopy](../../weka/filters/Filter.html#makeCopy-weka.filters.Filter-), [numPendingOutput](../../weka/filters/Filter.html#numPendingOutput--), [output](../../weka/filters/Filter.html#output--), [outputPeek](../../weka/filters/Filter.html#outputPeek--), [toString](../../weka/filters/Filter.html#toString--), [useFilter](../../weka/filters/Filter.html#useFilter-weka.core.Instances-weka.filters.Filter-), [wekaStaticWrapper](../../weka/filters/Filter.html#wekaStaticWrapper-weka.filters.Sourcable-java.lang.String-weka.core.Instances-weka.core.Instances-)` * ### Methods inherited from class java.lang.Object `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`
Constructor Detail
* #### MultiFilter public MultiFilter()
Method Detail
* #### globalInfo public java.lang.String globalInfo() Returns a string describing this filter Specified by: `[globalInfo](../../weka/filters/SimpleFilter.html#globalInfo--)` in class `[SimpleFilter](../../weka/filters/SimpleFilter.html "class in weka.filters")` Returns: a description of the filter suitable for displaying in the explorer/experimenter gui * #### listOptions public java.util.Enumeration listOptions() Returns an enumeration describing the available options. Specified by: `[listOptions](../../weka/core/OptionHandler.html#listOptions--)` in interface `[OptionHandler](../../weka/core/OptionHandler.html "interface in weka.core")` Overrides: `[listOptions](../../weka/filters/SimpleFilter.html#listOptions--)` in class `[SimpleFilter](../../weka/filters/SimpleFilter.html "class in weka.filters")` Returns: an enumeration of all the available options. * #### setOptions public void setOptions(java.lang.String[] options) throws java.lang.Exception Parses a list of options for this object. Valid options are: -D Turns on output of debugging information. -F <classname [options]> A filter to apply (can be specified multiple times). Specified by: `[setOptions](../../weka/core/OptionHandler.html#setOptions-java.lang.String:A-)` in interface `[OptionHandler](../../weka/core/OptionHandler.html "interface in weka.core")` Overrides: `[setOptions](../../weka/filters/SimpleFilter.html#setOptions-java.lang.String:A-)` in class `[SimpleFilter](../../weka/filters/SimpleFilter.html "class in weka.filters")` Parameters: `options` \- the list of options as an array of strings Throws: `java.lang.Exception` \- if an option is not supported See Also: [SimpleFilter.reset()](../../weka/filters/SimpleFilter.html#reset--) * #### getOptions public java.lang.String[] getOptions() Gets the current settings of the filter. Specified by: `[getOptions](../../weka/core/OptionHandler.html#getOptions--)` in interface `[OptionHandler](../../weka/core/OptionHandler.html "interface in weka.core")` Overrides: `[getOptions](../../weka/filters/SimpleFilter.html#getOptions--)` in class `[SimpleFilter](../../weka/filters/SimpleFilter.html "class in weka.filters")` Returns: an array of strings suitable for passing to setOptions * #### getCapabilities public [Capabilities](../../weka/core/Capabilities.html "class in weka.core") getCapabilities() Returns the Capabilities of this filter. Specified by: `[getCapabilities](../../weka/core/CapabilitiesHandler.html#getCapabilities--)` in interface `[CapabilitiesHandler](../../weka/core/CapabilitiesHandler.html "interface in weka.core")` Overrides: `[getCapabilities](../../weka/filters/Filter.html#getCapabilities--)` in class `[Filter](../../weka/filters/Filter.html "class in weka.filters")` Returns: the capabilities of this object See Also: [Capabilities](../../weka/core/Capabilities.html "class in weka.core") * #### setFilters public void setFilters([Filter](../../weka/filters/Filter.html "class in weka.filters")[] filters) Sets the list of possible filters to choose from. Also resets the state of the filter (this reset doesn't affect the options). Parameters: `filters` \- an array of filters with all options set. See Also: [reset()](../../weka/filters/MultiFilter.html#reset--) * #### getFilters public [Filter](../../weka/filters/Filter.html "class in weka.filters")[] getFilters() Gets the list of possible filters to choose from. Returns: the array of Filters * #### filtersTipText public java.lang.String filtersTipText() Returns the tip text for this property Returns: tip text for this property suitable for displaying in the explorer/experimenter gui * #### getFilter public [Filter](../../weka/filters/Filter.html "class in weka.filters") getFilter(int index) Gets a single filter from the set of available filters. Parameters: `index` \- the index of the filter wanted Returns: the Filter * #### isStreamableFilter public boolean isStreamableFilter() tests whether all the enclosed filters are streamable Returns: true if all the enclosed filters are streamable * #### batchFinished public boolean batchFinished() throws java.lang.Exception Signify that this batch of input to the filter is finished. If the filter requires all instances prior to filtering, output() may now be called to retrieve the filtered instances. Any subsequent instances filtered should be filtered based on setting obtained from the first batch (unless the setInputFormat has been re-assigned or new options have been set). Overrides: `[batchFinished](../../weka/filters/SimpleStreamFilter.html#batchFinished--)` in class `[SimpleStreamFilter](../../weka/filters/SimpleStreamFilter.html "class in weka.filters")` Returns: true if there are instances pending output Throws: `java.lang.IllegalStateException` \- if no input format has been set. `java.lang.NullPointerException` \- if no input structure has been defined, `java.lang.Exception` \- if there was a problem finishing the batch. * #### getRevision public java.lang.String getRevision() Returns the revision string. Specified by: `[getRevision](../../weka/core/RevisionHandler.html#getRevision--)` in interface `[RevisionHandler](../../weka/core/RevisionHandler.html "interface in weka.core")` Overrides: `[getRevision](../../weka/filters/Filter.html#getRevision--)` in class `[Filter](../../weka/filters/Filter.html "class in weka.filters")` Returns: the revision * #### main public static void main(java.lang.String[] args) Main method for executing this class. Parameters: `args` \- should contain arguments for the filter: use -h for help