|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.filters.Filter
weka.filters.unsupervised.attribute.MergeManyValues
public class MergeManyValues
Merges many values of a nominal attribute into one value.
Valid options are:-C <col> Sets the attribute index (default: last)
-M <label> Sets the label of the newly merged classes (default: 'merged')
-R <range> Sets the merge range. 'first and 'last' are accepted as well.' E.g.: first-5,7,9,20-last (default: 1,2)
Constructor Summary | |
---|---|
MergeManyValues()
|
Method Summary | |
---|---|
java.lang.String |
attributeIndexTipText()
Returns the tip text for this property. |
java.lang.String |
getAttributeIndex()
Get the index of the attribute used. |
Capabilities |
getCapabilities()
Returns the Capabilities of this filter. |
java.lang.String |
getLabel()
Get the label for the new merged class. |
java.lang.String |
getMergeValueRange()
Get the range of the merge values used. |
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 |
labelTipText()
Returns the tip text for this property. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] args)
Main method for executing this filter. |
java.lang.String |
mergeValueRangeTipText()
Returns the tip text for this property. |
void |
setAttributeIndex(java.lang.String attIndex)
Sets index of the attribute used. |
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances. |
void |
setLabel(java.lang.String alabel)
Sets label of the merged class. |
void |
setMergeValueRange(java.lang.String range)
Sets range of the merge values used. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
Methods inherited from class weka.filters.Filter |
---|
batchFilterFile, batchFinished, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MergeManyValues()
Method Detail |
---|
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-C <col> Sets the attribute index (default: last)
-M <label> Sets the label of the newly merged classes (default: 'merged')
-R <range> Sets the merge range. 'first and 'last' are accepted as well.' E.g.: first-5,7,9,20-last (default: 1,2)
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Filter
Capabilities
public boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
setInputFormat
in class Filter
instanceInfo
- 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)
input
in class Filter
instance
- the input instance
java.lang.IllegalStateException
- if no input format has been set.public java.lang.String attributeIndexTipText()
public java.lang.String getAttributeIndex()
public void setAttributeIndex(java.lang.String attIndex)
attIndex
- the index of the attributepublic java.lang.String labelTipText()
public java.lang.String getLabel()
public void setLabel(java.lang.String alabel)
alabel
- the new label.public java.lang.String getMergeValueRange()
public java.lang.String mergeValueRangeTipText()
public void setMergeValueRange(java.lang.String range)
range
- the range of the merged valuespublic java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Filter
public static void main(java.lang.String[] args)
args
- use -h to display all options
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |