| |
|
| java.lang.Object weka.filters.Filter weka.filters.unsupervised.instance.RemoveRange
RemoveRange | public class RemoveRange extends Filter implements UnsupervisedFilter,OptionHandler(Code) | |
A filter that removes a given range of instances of a dataset.
Valid options are:
-R <inst1,inst2-inst4,...>
Specifies list of instances to select. First and last
are valid indexes. (required)
-V
Specifies if inverse of selection is to be output.
author: Eibe Frank (eibe@cs.waikato.ac.nz) version: $Revision: 1.7 $ |
serialVersionUID | final static long serialVersionUID(Code) | | for serialization
|
batchFinished | public boolean batchFinished()(Code) | | Signify that this batch of input to the filter is
finished. Output() may now be called to retrieve the filtered
instances.
true if there are instances pending output throws: IllegalStateException - if no input structure has been defined |
getCapabilities | public Capabilities getCapabilities()(Code) | | Returns the Capabilities of this filter.
the capabilities of this object See Also: Capabilities |
getInstancesIndices | public String getInstancesIndices()(Code) | | Gets ranges of instances selected.
a string containing a comma-separated list of ranges |
getInvertSelection | public boolean getInvertSelection()(Code) | | Gets if selection is to be inverted.
true if the selection is to be inverted |
getOptions | public String[] getOptions()(Code) | | Gets the current settings of the filter.
an array of strings suitable for passing to setOptions. |
globalInfo | public String globalInfo()(Code) | | Returns a string describing this filter
a description of the filter suitable fordisplaying in the GUI. |
input | public boolean input(Instance instance)(Code) | | Input an instance for filtering. Filter requires all
training instances be read before producing output.
Parameters: instance - the input instance true if the filtered instance may now becollected with output(). throws: IllegalStateException - if no input structure has been defined |
instancesIndicesTipText | public String instancesIndicesTipText()(Code) | | Returns the tip text for this property
tip text for this property suitable fordisplaying in the explorer/experimenter gui |
invertSelectionTipText | public String invertSelectionTipText()(Code) | | Returns the tip text for this property
tip text for this property suitable fordisplaying in the explorer/experimenter gui |
listOptions | public Enumeration listOptions()(Code) | | Returns an enumeration describing the available options.
an enumeration of all the available options. |
main | public static void main(String[] argv)(Code) | | Main method for testing this class.
Parameters: argv - should contain arguments to the filter: use -h for help |
setInputFormat | public boolean setInputFormat(Instances instanceInfo) throws Exception(Code) | | Sets the format of the input instances.
Parameters: instanceInfo - an Instances object containing the input instancestructure (any instances contained in the object are ignored - only thestructure is required). true because outputFormat can be collected immediately throws: Exception - if the input format can't be set successfully |
setInstancesIndices | public void setInstancesIndices(String rangeList)(Code) | | Sets the ranges of instances to be selected. If provided string
is null, ranges won't be used for selecting instances.
Parameters: rangeList - a string representing the list of instances. eg: first-3,5,6-last throws: IllegalArgumentException - if an invalid range list is supplied |
setInvertSelection | public void setInvertSelection(boolean inverse)(Code) | | Sets if selection is to be inverted.
Parameters: inverse - true if inversion is to be performed |
setOptions | public void setOptions(String[] options) throws Exception(Code) | | Parses a given list of options.
Valid options are:
-R <inst1,inst2-inst4,...>
Specifies list of instances to select. First and last
are valid indexes. (required)
-V
Specifies if inverse of selection is to be output.
Parameters: options - the list of options as an array of string.s throws: Exception - if an option is not supported. |
Methods inherited from weka.filters.Filter | public static void batchFilterFile(Filter filter, String[] options) throws Exception(Code)(Java Doc) public boolean batchFinished() throws Exception(Code)(Java Doc) protected void bufferInput(Instance instance)(Code)(Java Doc) protected void copyValues(Instance instance, boolean isInput)(Code)(Java Doc) protected void copyValues(Instance instance, boolean instSrcCompat, Instances srcDataset, Instances destDataset)(Code)(Java Doc) public static void filterFile(Filter filter, String[] options) throws Exception(Code)(Java Doc) protected void flushInput()(Code)(Java Doc) public Capabilities getCapabilities()(Code)(Java Doc) public Capabilities getCapabilities(Instances data)(Code)(Java Doc) protected Instances getInputFormat()(Code)(Java Doc) public Instances getOutputFormat()(Code)(Java Doc) protected void initInputLocators(Instances data, int[] indices)(Code)(Java Doc) protected void initOutputLocators(Instances data, int[] indices)(Code)(Java Doc) public boolean input(Instance instance) throws Exception(Code)(Java Doc) protected Instances inputFormatPeek()(Code)(Java Doc) public boolean isFirstBatchDone()(Code)(Java Doc) public boolean isNewBatch()(Code)(Java Doc) public boolean isOutputFormatDefined()(Code)(Java Doc) public static void main(String[] args)(Code)(Java Doc) public static Filter[] makeCopies(Filter model, int num) throws Exception(Code)(Java Doc) public static Filter makeCopy(Filter model) throws Exception(Code)(Java Doc) public int numPendingOutput()(Code)(Java Doc) public Instance output()(Code)(Java Doc) protected Instances outputFormatPeek()(Code)(Java Doc) public Instance outputPeek()(Code)(Java Doc) protected void push(Instance instance)(Code)(Java Doc) protected void resetQueue()(Code)(Java Doc) protected static void runFilter(Filter filter, String[] options)(Code)(Java Doc) public boolean setInputFormat(Instances instanceInfo) throws Exception(Code)(Java Doc) protected void setOutputFormat(Instances outputFormat)(Code)(Java Doc) protected void testInputFormat(Instances instanceInfo) throws Exception(Code)(Java Doc) public static Instances useFilter(Instances data, Filter filter) throws Exception(Code)(Java Doc)
|
|
|
|