public class RemoveByName extends SimpleStreamFilter implements WeightedInstancesHandler, WeightedAttributesHandler
-D Turns on output of debugging information.
-E <regular expression> The regular expression to match the attribute names against. (default: ^.*id$)
-V Flag for inverting the matching sense. If set, attributes are kept instead of deleted. (default: off)
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_EXPRESSION
the default expression.
|
protected java.lang.String |
m_Expression
the regular expression for selecting the attributes by name.
|
protected boolean |
m_InvertSelection
whether to invert the matching sense.
|
protected Remove |
m_Remove
the Remove filter used internally for removing the attributes.
|
m_Debug, m_DoNotCheckCapabilities, m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts| Constructor and Description |
|---|
RemoveByName() |
| Modifier and Type | Method and Description |
|---|---|
protected Instances |
determineOutputFormat(Instances inputFormat)
Determines the output format based on the input format and returns this.
|
java.lang.String |
expressionTipText()
Returns the tip text for this property.
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
java.lang.String |
getExpression()
Returns the regular expression in use.
|
boolean |
getInvertSelection()
Get whether the supplied columns are to be removed or kept.
|
java.lang.String[] |
getOptions()
returns the options of the current setup.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing this classifier.
|
java.lang.String |
invertSelectionTipText()
Returns the tip text for this property.
|
java.util.Enumeration<Option> |
listOptions()
Gets an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
runs the filter with the given arguments.
|
protected Instance |
process(Instance instance)
processes the given instance (may change the provided instance) and returns
the modified version.
|
void |
setExpression(java.lang.String value)
Sets the regular expression to match the attribute names against.
|
void |
setInvertSelection(boolean value)
Set whether selected columns should be removed or kept.
|
void |
setOptions(java.lang.String[] options)
Parses the options for this object.
|
batchFinished, hasImmediateOutputFormat, input, preprocess, processreset, setInputFormatbatchFilterFile, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getInputFormat, getOutputFormat, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapperpublic static final java.lang.String DEFAULT_EXPRESSION
protected java.lang.String m_Expression
protected boolean m_InvertSelection
protected Remove m_Remove
public java.lang.String globalInfo()
globalInfo in class SimpleFilterpublic java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class Filterpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Filterpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-D Turns on output of debugging information.
-E <regular expression> The regular expression to match the attribute names against. (default: ^.*id$)
-V Flag for inverting the matching sense. If set, attributes are kept instead of deleted. (default: off)
setOptions in interface OptionHandlersetOptions in class Filteroptions - the options to usejava.lang.Exception - if the option setting failspublic void setExpression(java.lang.String value)
value - the regular expressionpublic java.lang.String getExpression()
public java.lang.String expressionTipText()
public void setInvertSelection(boolean value)
value - the new invert settingpublic boolean getInvertSelection()
public java.lang.String invertSelectionTipText()
protected Instances determineOutputFormat(Instances inputFormat) throws java.lang.Exception
determineOutputFormat in class SimpleStreamFilterinputFormat - the input format to base the output format onjava.lang.Exception - in case the determination goes wrongSimpleStreamFilter.hasImmediateOutputFormat(),
SimpleStreamFilter.batchFinished(),
SimpleStreamFilter.preprocess(Instances)public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilitiesprotected Instance process(Instance instance) throws java.lang.Exception
process in class SimpleStreamFilterinstance - the instance to processjava.lang.Exception - in case the processing goes wrongpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(java.lang.String[] args)
args - the commandline arguments