public class NumericToBinary extends PotentialClassIgnorer implements UnsupervisedFilter, StreamableFilter
-unset-class-temporarily Unsets the class index temporarily before the filter is applied to the data. (default: no)
| Constructor and Description |
|---|
NumericToBinary() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
attributeIndicesTipText()
Returns the tip text for this property
|
java.lang.String |
getAttributeIndices()
Gets the current range selection
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
boolean |
getInvertSelection()
Gets whether the supplied columns are to be worked on or the others.
|
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 instance)
Input an instance for filtering.
|
java.lang.String |
invertSelectionTipText()
Returns the tip text for this property
|
java.util.Enumeration<Option> |
listOptions()
Gets an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
void |
setAttributeIndices(java.lang.String value)
Sets which attributes are to be "binarized" (only numeric attributes
among the selection will be transformed).
|
void |
setAttributeIndicesArray(int[] value)
Sets which attributes are to be transformed to binary.
|
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances.
|
void |
setInvertSelection(boolean value)
Sets whether selected columns should be worked on or all the others apart
from these.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
getIgnoreClass, getOutputFormat, ignoreClassTipText, setIgnoreClassbatchFilterFile, batchFinished, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getDebug, getDoNotCheckCapabilities, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, postExecution, preExecution, run, runFilter, setDebug, setDoNotCheckCapabilities, toString, useFilter, wekaStaticWrapperpublic 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
-R <col1,col2-col4,...> Specifies list of columns to binarize. First and last are valid indexes. (default: first-last)
-V Invert matching sense of column indexes.
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()
PotentialClassIgnorergetOptions in interface OptionHandlergetOptions in class PotentialClassIgnorerpublic java.lang.String invertSelectionTipText()
public boolean getInvertSelection()
public void setInvertSelection(boolean value)
value - the new invert settingpublic java.lang.String attributeIndicesTipText()
public java.lang.String getAttributeIndices()
public void setAttributeIndices(java.lang.String value)
value - a string representing the list of attributes. Since the string
will typically come from a user, attributes are indexed from 1. java.lang.IllegalArgumentException - if an invalid range list is suppliedpublic void setAttributeIndicesArray(int[] value)
value - an array containing indexes of attributes to binarize. Since
the array will typically come from a program, attributes are
indexed from 0.java.lang.IllegalArgumentException - if an invalid set of ranges is suppliedpublic boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
setInputFormat in class PotentialClassIgnorerinstanceInfo - 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 instance)
public 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