Class DatasetCleaner
- java.lang.Object
-
- weka.filters.Filter
-
- weka.filters.SimpleFilter
-
- weka.filters.SimpleBatchFilter
-
- weka.filters.unsupervised.instance.AbstractRowFinderApplier
-
- weka.filters.unsupervised.instance.DatasetCleaner
-
- All Implemented Interfaces:
Serializable
,weka.core.CapabilitiesHandler
,weka.core.CapabilitiesIgnorer
,weka.core.CommandlineRunnable
,weka.core.OptionHandler
,weka.core.RevisionHandler
public class DatasetCleaner extends AbstractRowFinderApplier
Removes all rows from the data data that have been indentified.
Valid options are:
-D Turns on output of debugging information.
-W <row finder specification> Full class name of row finder to use, followed by scheme options. eg: "adams.data.weka.rowfinder.NullFinder -D 1" (default: adams.data.weka.rowfinder.NullFinder)
-invert Whether to invert the found row indices. (default: off)
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class weka.filters.unsupervised.instance.AbstractRowFinderApplier
m_Invert, m_OnlyFirstBatch, m_RowFinder
-
-
Constructor Summary
Constructors Constructor Description DatasetCleaner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected weka.core.Instances
apply(weka.core.Instances data, int[] indices)
Applies the indices to the data.protected weka.core.Instances
determineOutputFormat(weka.core.Instances inputFormat)
Determines the output format based on the input format and returns this.String
getRevision()
Returns the revision string.String
globalInfo()
Returns a string describing this classifier.protected boolean
mayRemoveInstances()
Method that returns whether the filter may remove instances after the first batch has been done.String
rowFinderTipText()
Returns the tip text for this property.-
Methods inherited from class weka.filters.unsupervised.instance.AbstractRowFinderApplier
getCapabilities, getInvert, getOnlyFirstBatch, getOptions, getRowFinder, invertTipText, listOptions, mayRemoveInstanceAfterFirstBatchDone, onlyFirstBatchTipText, process, setInvert, setOnlyFirstBatch, setOptions, setRowFinder
-
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, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, main, makeCopies, makeCopy, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing this classifier.- Specified by:
globalInfo
in classweka.filters.SimpleFilter
- Returns:
- a description of the classifier suitable for displaying in the explorer/experimenter gui
-
rowFinderTipText
public String rowFinderTipText()
Returns the tip text for this property.- Specified by:
rowFinderTipText
in classAbstractRowFinderApplier
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
determineOutputFormat
protected weka.core.Instances determineOutputFormat(weka.core.Instances inputFormat) throws Exception
Determines 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:
determineOutputFormat
in classAbstractRowFinderApplier
- Parameters:
inputFormat
- the input format to base the output format on- Returns:
- the output format
- Throws:
Exception
- in case the determination goes wrong
-
mayRemoveInstances
protected boolean mayRemoveInstances()
Method that returns whether the filter may remove instances after the first batch has been done.- Specified by:
mayRemoveInstances
in classAbstractRowFinderApplier
- Returns:
- always true
- See Also:
AbstractRowFinderApplier.mayRemoveInstanceAfterFirstBatchDone()
-
apply
protected 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.- Specified by:
apply
in classAbstractRowFinderApplier
- Parameters:
data
- the data to processindices
- the indices to use- Returns:
- the processed data
-
getRevision
public String getRevision()
Returns the revision string.- Specified by:
getRevision
in interfaceweka.core.RevisionHandler
- Overrides:
getRevision
in classweka.filters.Filter
- Returns:
- the revision
-
-