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)
| 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, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, postExecution, preExecution, run, runFilter, setDebug, setDoNotCheckCapabilities, toString, useFilter, wekaStaticWrapperequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic 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