public class RenameNominalValues extends Filter implements UnsupervisedFilter, StreamableFilter, OptionHandler
-R Attributes to act on. Can be either a range string (e.g. 1,2,6-10) OR a comma-separated list of named attributes (default none)
-V Invert matching sense (i.e. act on all attributes other than those specified)
-N Nominal labels and their replacement values. E.g. red:blue, black:white, fred:bob
-I Ignore case when matching nominal values
| Constructor and Description |
|---|
RenameNominalValues() |
| Modifier and Type | Method and Description |
|---|---|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
boolean |
getIgnoreCase() |
boolean |
getInvertSelection()
Get whether the supplied columns are to be removed or kept
|
java.lang.String[] |
getOptions()
Gets the current settings of the filter.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
getSelectedAttributes() |
java.lang.String |
getValueReplacements() |
java.lang.String |
globalInfo()
Global help info
|
java.lang.String |
ignoreCaseTipText()
Returns the tip text for this property
|
boolean |
input(Instance instance)
Input an instance for filtering.
|
java.lang.String |
invertSelectionTipText()
Returns the tip text for this property
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
java.lang.String |
selectedAttributesTipText()
Returns the tip text for this property
|
void |
setIgnoreCase(boolean ignore) |
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances.
|
void |
setInvertSelection(boolean invert)
Set whether selected columns should be removed or kept.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setSelectedAttributes(java.lang.String atts) |
void |
setValueReplacements(java.lang.String v) |
java.lang.String |
valueReplacementsTipText()
Returns the tip text for this property
|
batchFilterFile, batchFinished, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getDebug, getDoNotCheckCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, postExecution, preExecution, run, runFilter, setDebug, setDoNotCheckCapabilities, toString, useFilter, wekaStaticWrapperpublic java.lang.String globalInfo()
public boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
setInputFormat in class FilterinstanceInfo - an Instances object containing the input instance
structure (any instances contained in the object are ignored -
only the structure is required).java.lang.Exception - if the format couldn't be set successfullypublic boolean input(Instance instance)
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilitiespublic java.lang.String selectedAttributesTipText()
public void setSelectedAttributes(java.lang.String atts)
public java.lang.String getSelectedAttributes()
public java.lang.String valueReplacementsTipText()
public void setValueReplacements(java.lang.String v)
public java.lang.String getValueReplacements()
public java.lang.String invertSelectionTipText()
public boolean getInvertSelection()
public void setInvertSelection(boolean invert)
invert - the new invert settingpublic java.lang.String ignoreCaseTipText()
public void setIgnoreCase(boolean ignore)
public boolean getIgnoreCase()
public java.util.Enumeration<Option> listOptions()
FilterlistOptions in interface OptionHandlerlistOptions in class Filterpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
Valid options are:
-R Attributes to act on. Can be either a range string (e.g. 1,2,6-10) OR a comma-separated list of named attributes (default none)
-V Invert matching sense (i.e. act on all attributes other than those specified)
-N Nominal labels and their replacement values. E.g. red:blue, black:white, fred:bob
-I Ignore case when matching nominal values
setOptions in interface OptionHandlersetOptions in class Filteroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
FiltergetOptions in interface OptionHandlergetOptions in class Filterpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(java.lang.String[] argv)
argv - should contain arguments to the filter: use -h for help