public class OrdinalToNumeric extends PotentialClassIgnorer implements StreamableFilter, UnsupervisedFilter, EnvironmentHandler, WeightedAttributesHandler, WeightedInstancesHandler
-unset-class-temporarily Unsets the class index temporarily before the filter is applied to the data. (default: no)
-R <range or list of names> Attributes to operate on. Can be a 1-based index range of indices, or a comma-separated list of names. (default: first-last)
| Modifier and Type | Field and Description |
|---|---|
protected Environment |
m_env
For resolving environment variables
|
protected java.lang.String |
m_range
Textual range string
|
protected java.lang.String |
m_resolvedRange
Holds the resolved range
|
protected Range |
m_selectedRange
Range of columns to consider
|
m_ClassIndex, m_IgnoreClassm_Debug, m_DoNotCheckCapabilities, m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts| Constructor and Description |
|---|
OrdinalToNumeric() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAttributesToOperateOn()
Get the attributes to operate on
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
java.lang.String[] |
getOptions()
Gets the current settings of the filter.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing this filter
|
boolean |
input(Instance inst)
Input an instance for filtering.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
Main method for testing this class.
|
void |
setAttributesToOperateOn(java.lang.String atts)
Set the attributes to operate on
|
void |
setEnvironment(Environment env)
Set environment to use
|
boolean |
setInputFormat(Instances instancesInfo)
Sets the format of the input instances.
|
void |
setOptions(java.lang.String[] options)
Parses a list of options for this object.
|
getIgnoreClass, getOutputFormat, ignoreClassTipText, setIgnoreClassbatchFilterFile, batchFinished, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getInputFormat, 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, wekaStaticWrapperprotected transient Environment m_env
protected Range m_selectedRange
protected java.lang.String m_range
protected java.lang.String m_resolvedRange
public java.lang.String globalInfo()
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilitiespublic java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class PotentialClassIgnorerpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface OptionHandlersetOptions in class PotentialClassIgnoreroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class PotentialClassIgnorer@OptionMetadata(displayName="Attributes to operate on", description="Attributes to operate on. Can be a 1-based index range of indices or a comma-separated list of names", commandLineParamName="R", commandLineParamSynopsis="-R <range or list of names>", displayOrder=1) public void setAttributesToOperateOn(java.lang.String atts)
atts - a range of 1-based indexes or a comma-separated list of
attribute namespublic java.lang.String getAttributesToOperateOn()
public boolean setInputFormat(Instances instancesInfo) throws java.lang.Exception
setInputFormat in class PotentialClassIgnorerinstancesInfo - 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 input format can't be set successfullypublic boolean input(Instance inst) throws java.lang.Exception
input in class Filterinst - the input instancejava.lang.IllegalStateException - if no input format has been defined.java.lang.NullPointerException - if the input format has not been defined.java.lang.Exception - if the input instance was not of the correct format or if
there was a problem with the filtering.public java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic void setEnvironment(Environment env)
setEnvironment in interface EnvironmentHandlerenv - the environment variables topublic static void main(java.lang.String[] args)
args - should contain arguments to the filter: use -h for help