|
||||||||||
| 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)
-L <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 | |
|---|---|
String |
attributeIndexTipText()
Returns the tip text for this property. |
String |
getAttributeIndex()
Get the index of the attribute used. |
Capabilities |
getCapabilities()
Returns the Capabilities of this filter. |
String |
getLabel()
Get the label for the new merged class. |
String |
getMergeValueRange()
Get the range of the merge values used. |
String[] |
getOptions()
Gets the current settings of the filter. |
String |
getRevision()
Returns the revision string. |
String |
globalInfo()
Returns a string describing this filter |
boolean |
input(Instance instance)
Input an instance for filtering. |
String |
labelTipText()
Returns the tip text for this property. |
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(String[] args)
Main method for executing this filter. |
String |
mergeValueRangeTipText()
Returns the tip text for this property. |
void |
setAttributeIndex(String attIndex)
Sets index of the attribute used. |
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances. |
void |
setLabel(String alabel)
Sets label of the merged class. |
void |
setMergeValueRange(String range)
Sets range of the merge values used. |
void |
setOptions(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, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, runFilter, 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 String globalInfo()
public Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(String[] options)
throws Exception
-C <col> Sets the attribute index (default: last)
-L <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 OptionHandleroptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlerpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilities
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 input format can't be set
successfullypublic boolean input(Instance instance)
input in class Filterinstance - the input instance
IllegalStateException - if no input format has been set.public String attributeIndexTipText()
public String getAttributeIndex()
public void setAttributeIndex(String attIndex)
attIndex - the index of the attributepublic String labelTipText()
public String getLabel()
public void setLabel(String alabel)
alabel - the new label.public String getMergeValueRange()
public String mergeValueRangeTipText()
public void setMergeValueRange(String range)
range - the range of the merged valuespublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(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 | |||||||||