|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.filters.Filter
weka.filters.supervised.attribute.AttributeSelection
public class AttributeSelection
A supervised attribute filter that can be used to select attributes. It is very flexible and allows various search and evaluation methods to be combined.
Valid options are:-S <"Name of search class [search options]"> Sets search method for subset evaluators. eg. -S "weka.attributeSelection.BestFirst -S 8"
-E <"Name of attribute/subset evaluation class [evaluator options]"> Sets attribute/subset evaluator. eg. -E "weka.attributeSelection.CfsSubsetEval -L"
Options specific to evaluator weka.attributeSelection.CfsSubsetEval:
-M Treat missing values as a seperate value.
-L Don't include locally predictive attributes.
Options specific to search weka.attributeSelection.BestFirst:
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7.
-D <0 = backward | 1 = forward | 2 = bi-directional> Direction of search. (default = 1).
-N <num> Number of non-improving nodes to consider before terminating search.
-S <num> Size of lookup cache for evaluated subsets. Expressed as a multiple of the number of attributes in the data set. (default = 1)
| Constructor Summary | |
|---|---|
AttributeSelection()
Constructor |
|
| Method Summary | |
|---|---|
boolean |
batchFinished()
Signify that this batch of input to the filter is finished. |
java.lang.String |
evaluatorTipText()
Returns the tip text for this property |
Capabilities |
getCapabilities()
Returns the Capabilities of this filter. |
ASEvaluation |
getEvaluator()
Get the name of the attribute/subset evaluator |
java.lang.String[] |
getOptions()
Gets the current settings for the attribute selection (search, evaluator) etc. |
java.lang.String |
getRevision()
Returns the revision string. |
ASSearch |
getSearch()
Get the name of the search method |
java.lang.String |
globalInfo()
Returns a string describing this filter |
boolean |
input(Instance instance)
Input an instance for filtering. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
searchTipText()
Returns the tip text for this property |
void |
setEvaluator(ASEvaluation evaluator)
set attribute/subset evaluator |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSearch(ASSearch search)
Set search class |
| Methods inherited from class weka.filters.Filter |
|---|
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, setInputFormat, toString, useFilter, wekaStaticWrapper |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeSelection()
| 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
-S <"Name of search class [search options]"> Sets search method for subset evaluators. eg. -S "weka.attributeSelection.BestFirst -S 8"
-E <"Name of attribute/subset evaluation class [evaluator options]"> Sets attribute/subset evaluator. eg. -E "weka.attributeSelection.CfsSubsetEval -L"
Options specific to evaluator weka.attributeSelection.CfsSubsetEval:
-M Treat missing values as a seperate value.
-L Don't include locally predictive attributes.
Options specific to search weka.attributeSelection.BestFirst:
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7.
-D <0 = backward | 1 = forward | 2 = bi-directional> Direction of search. (default = 1).
-N <num> Number of non-improving nodes to consider before terminating search.
-S <num> Size of lookup cache for evaluated subsets. Expressed as a multiple of the number of attributes in the data set. (default = 1)
setOptions in interface OptionHandleroptions - 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 OptionHandlerpublic java.lang.String evaluatorTipText()
public void setEvaluator(ASEvaluation evaluator)
evaluator - the evaluator to usepublic java.lang.String searchTipText()
public void setSearch(ASSearch search)
search - the search class to usepublic ASEvaluation getEvaluator()
public ASSearch getSearch()
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilities
public boolean input(Instance instance)
throws java.lang.Exception
input in class Filterinstance - the input instance
java.lang.IllegalStateException - if no input format has 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 boolean batchFinished()
throws java.lang.Exception
batchFinished in class Filterjava.lang.IllegalStateException - if no input structure has been defined.
java.lang.Exception - if there is a problem during the attribute selection.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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||