|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weka.filters.Filter weka.filters.supervised.attribute.AttributeSelection
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 | |
private ASEvaluation |
m_ASEvaluator
the attribute evaluator to use |
private ASSearch |
m_ASSearch
the search method if any |
private java.lang.String[] |
m_FilterOptions
holds a copy of the full set of valid options passed to the filter |
private int[] |
m_SelectedAttributes
holds the selected attributes |
private AttributeSelection |
m_trainSelector
the attribute selection evaluation object |
Fields inherited from class weka.filters.Filter |
m_NewBatch |
Constructor Summary | |
AttributeSelection()
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. |
java.lang.String |
evaluatorTipText()
Returns the tip text for this property |
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 |
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. |
protected void |
resetOptions()
set options to their default values |
java.lang.String |
searchTipText()
Returns the tip text for this property |
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, inputFormatPeek, 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 |
Field Detail |
private AttributeSelection m_trainSelector
private ASEvaluation m_ASEvaluator
private ASSearch m_ASSearch
private java.lang.String[] m_FilterOptions
private int[] m_SelectedAttributes
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]">
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
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String evaluatorTipText()
public void setEvaluator(ASEvaluation evaluator)
public java.lang.String searchTipText()
public void setSearch(ASSearch search)
public ASEvaluation getEvaluator()
public ASSearch getSearch()
public boolean input(Instance instance) throws java.lang.Exception
input
in class Filter
instance
- 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 Filter
java.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
java.lang.Exception
protected void convertInstance(Instance instance) throws java.lang.Exception
instance
- the instance to convert
java.lang.Exception
protected 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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |