|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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"
Field Summary |
Fields inherited from class weka.filters.Filter |
m_Debug, 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 |
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. |
Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(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(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 Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws 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 OptionHandler
options
- the list of options as an array of strings
Exception
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
public void setEvaluator(ASEvaluation evaluator)
public void setSearch(ASSearch search)
public ASEvaluation getEvaluator()
public ASSearch getSearch()
public boolean input(Instance instance) throws Exception
input
in class Filter
instance
- the input instance
IllegalStateException
- if no input format has been defined.
Exception
- if the input instance was not of the correct format
or if there was a problem with the filtering.public boolean batchFinished() throws Exception
batchFinished
in class Filter
IllegalStateException
- if no input structure has been defined.
Exception
- if there is a problem during the attribute selection.protected void setOutputFormat() throws Exception
Exception
protected void convertInstance(Instance instance) throws Exception
instance
- the instance to convert
Exception
protected void resetOptions()
public static void main(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 |