Class AbstractColumnFinderApplier
- java.lang.Object
-
- weka.filters.Filter
-
- weka.filters.SimpleFilter
-
- weka.filters.SimpleBatchFilter
-
- weka.filters.unsupervised.attribute.AbstractColumnFinderApplier
-
- All Implemented Interfaces:
Serializable,weka.core.CapabilitiesHandler,weka.core.CapabilitiesIgnorer,weka.core.CommandlineRunnable,weka.core.OptionHandler,weka.core.RevisionHandler
- Direct Known Subclasses:
DatasetCleaner
public abstract class AbstractColumnFinderApplier extends weka.filters.SimpleBatchFilterAncestor for filters that applyColumnFinderschemes to the data.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ColumnFinderm_ColumnFinderThe classifier template used to do the classification.protected booleanm_InvertWhether to invert the column indices.
-
Constructor Summary
Constructors Constructor Description AbstractColumnFinderApplier()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract weka.core.Instancesapply(weka.core.Instances data, int[] indices)Applies the indices to the data.abstract StringcolumnFinderTipText()Returns the tip text for this property.protected abstract weka.core.InstancesdetermineOutputFormat(weka.core.Instances inputFormat)Determines the output format based on the input format and returns this.weka.core.CapabilitiesgetCapabilities()Returns the Capabilities of this filter.ColumnFindergetColumnFinder()Returns the column finder used by the filter.booleangetInvert()Returns whether the invert the column indices.String[]getOptions()Gets the current settings of the classifier.StringinvertTipText()Returns the tip text for this property.EnumerationlistOptions()Returns an enumeration describing the available options.protected weka.core.Instancesprocess(weka.core.Instances instances)Processes the given data (may change the provided dataset) and returns the modified version.voidsetColumnFinder(ColumnFinder value)Sets the column finder to use.voidsetInvert(boolean value)Set whether the invert the column indices.voidsetOptions(String[] options)Parses the options for this object.-
Methods inherited from class weka.filters.SimpleBatchFilter
allowAccessToFullInputFormat, batchFinished, hasImmediateOutputFormat, input
-
Methods inherited from class weka.filters.Filter
batchFilterFile, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getDebug, getDoNotCheckCapabilities, getInputFormat, getOutputFormat, getRevision, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, main, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
-
-
-
-
Field Detail
-
m_ColumnFinder
protected ColumnFinder m_ColumnFinder
The classifier template used to do the classification.
-
m_Invert
protected boolean m_Invert
Whether to invert the column indices.
-
-
Method Detail
-
listOptions
public Enumeration listOptions()
Returns an enumeration describing the available options.- Specified by:
listOptionsin interfaceweka.core.OptionHandler- Overrides:
listOptionsin classweka.filters.Filter- Returns:
- an enumeration of all the available options.
-
setOptions
public void setOptions(String[] options) throws Exception
Parses the options for this object.- Specified by:
setOptionsin interfaceweka.core.OptionHandler- Overrides:
setOptionsin classweka.filters.Filter- Parameters:
options- the options to use- Throws:
Exception
-
getOptions
public String[] getOptions()
Gets the current settings of the classifier.- Specified by:
getOptionsin interfaceweka.core.OptionHandler- Overrides:
getOptionsin classweka.filters.Filter- Returns:
- an array of strings suitable for passing to setOptions
-
getCapabilities
public weka.core.Capabilities getCapabilities()
Returns the Capabilities of this filter.- Specified by:
getCapabilitiesin interfaceweka.core.CapabilitiesHandler- Overrides:
getCapabilitiesin classweka.filters.Filter- Returns:
- the capabilities of this object
- See Also:
Capabilities
-
setColumnFinder
public void setColumnFinder(ColumnFinder value)
Sets the column finder to use.- Parameters:
value- The column finder to be used (with its options set).
-
getColumnFinder
public ColumnFinder getColumnFinder()
Returns the column finder used by the filter.- Returns:
- The column finder to be used.
-
columnFinderTipText
public abstract String columnFinderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setInvert
public void setInvert(boolean value)
Set whether the invert the column indices.- Parameters:
value- true if to invert the indices
-
getInvert
public boolean getInvert()
Returns whether the invert the column indices.- Returns:
- true if the indices get inverted
-
invertTipText
public String invertTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
determineOutputFormat
protected abstract weka.core.Instances determineOutputFormat(weka.core.Instances inputFormat) throws ExceptionDetermines the output format based on the input format and returns this. In case the output format cannot be returned immediately, i.e., immediateOutputFormat() returns false, then this method will be called from batchFinished().- Specified by:
determineOutputFormatin classweka.filters.SimpleFilter- Parameters:
inputFormat- the input format to base the output format on- Returns:
- the output format
- Throws:
Exception
-
apply
protected abstract weka.core.Instances apply(weka.core.Instances data, int[] indices)Applies the indices to the data. In case inverting is enabled, the indices have already been inverted.- Parameters:
data- the data to processindices- the indices to use- Returns:
- the processed data
-
process
protected weka.core.Instances process(weka.core.Instances instances) throws ExceptionProcesses the given data (may change the provided dataset) and returns the modified version. This method is called in batchFinished().- Specified by:
processin classweka.filters.SimpleFilter- Parameters:
instances- the data to process- Returns:
- the modified data
- Throws:
Exception- See Also:
SimpleBatchFilter.batchFinished()
-
-