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
|
String[] |
getOptions()
Gets the current settings of the filter.
|
String |
getRevision()
Returns the revision string.
|
String |
getSelectedAttributes() |
String |
getValueReplacements() |
String |
globalInfo()
Global help info
|
String |
ignoreCaseTipText()
Returns the tip text for this property
|
boolean |
input(Instance instance)
Input an instance for filtering.
|
String |
invertSelectionTipText()
Returns the tip text for this property
|
Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] argv)
Main method for testing this class.
|
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(String[] options)
Parses a given list of options.
|
void |
setSelectedAttributes(String atts) |
void |
setValueReplacements(String v) |
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 String globalInfo()
public boolean setInputFormat(Instances instanceInfo) throws 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).Exception - if the format couldn't be set successfullypublic boolean input(Instance instance)
input in class Filterinstance - the input instanceIllegalStateException - if no input structure has been defined.public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilitiespublic String selectedAttributesTipText()
public void setSelectedAttributes(String atts)
public String getSelectedAttributes()
public String valueReplacementsTipText()
public void setValueReplacements(String v)
public String getValueReplacements()
public String invertSelectionTipText()
public boolean getInvertSelection()
public void setInvertSelection(boolean invert)
invert - the new invert settingpublic String ignoreCaseTipText()
public void setIgnoreCase(boolean ignore)
public boolean getIgnoreCase()
public Enumeration<Option> listOptions()
FilterlistOptions in interface OptionHandlerlistOptions in class Filterpublic void setOptions(String[] options) throws 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 stringsException - if an option is not supportedpublic String[] getOptions()
FiltergetOptions in interface OptionHandlergetOptions in class Filterpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(String[] argv)
argv - should contain arguments to the filter: use -h for helpCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.