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 option settings for the OptionHandler.
|
String |
getRevision()
Returns the revision string.
|
String |
getSelectedAttributes() |
String |
getValueReplacements() |
String |
globalInfo() |
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 of all 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, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, runFilter, 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()
OptionHandlerlistOptions in interface OptionHandlerpublic 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 OptionHandleroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
OptionHandlergetOptions in interface OptionHandlerpublic 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 © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.