|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--weka.filters.Filter
|
+--weka.filters.AttributeSelectionFilter
Filter for doing attribute selection.
Valid options are:
-S <"Name of search class [search options]">
Set search method for subset evaluators.
eg. -S "weka.attributeSelection.BestFirst -S 8"
-E <"Name of attribute/subset evaluation class [evaluator options]">
Set the attribute/subset evaluator.
eg. -E "weka.attributeSelection.CfsSubsetEval -L"
| Fields inherited from class weka.filters.Filter |
m_NewBatch |
| Constructor Summary | |
AttributeSelectionFilter()
Constructor |
|
| Method Summary | |
boolean |
batchFinished()
Signify that this batch of input to the filter is finished. |
protected void |
convertInstance(Instance instance)
Convert a single instance over. |
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. |
ASSearch |
getSearch()
Get the name of the search method |
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. |
protected void |
resetOptions()
set options to their default values |
void |
setEvaluator(ASEvaluation evaluator)
set a string holding the name of a attribute/subset evaluator |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
protected void |
setOutputFormat()
Set the output format. |
void |
setSearch(ASSearch search)
Set as string holding the name of a search class |
| Methods inherited from class weka.filters.Filter |
batchFilterFile, bufferInput, copyStringValues, copyStringValues, filterFile, flushInput, getInputFormat, getInputStringIndex, getOutputFormat, getOutputStringIndex, getStringIndices, inputFormat, isOutputFormatDefined, numPendingOutput, output, outputFormat, outputFormatPeek, outputPeek, push, resetQueue, setInputFormat, setOutputFormat, useFilter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AttributeSelectionFilter()
| Method Detail |
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]">
Set search method for subset evaluators.
eg. -S "weka.attributeSelection.BestFirst -S 8"
-E <"Name of attribute/subset evaluation class [evaluator options]">
Set the attribute/subset evaluator.
eg. -E "weka.attributeSelection.CfsSubsetEval -L"
setOptions in interface OptionHandleroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic void setEvaluator(ASEvaluation evaluator)
public void setSearch(ASSearch search)
public ASEvaluation getEvaluator()
public ASSearch getSearch()
public boolean input(Instance instance)
throws java.lang.Exception
input in class Filterinstance - the input instancejava.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.
protected void setOutputFormat()
throws java.lang.Exception
protected void convertInstance(Instance instance)
throws java.lang.Exception
instance - the instance to convertprotected void resetOptions()
public 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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||