public class AttributeSelection extends Filter implements SupervisedFilter, OptionHandler
-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 and Description |
---|
AttributeSelection()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
batchFinished()
Signify that this batch of input to the filter is finished.
|
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
|
String[] |
getOptions()
Gets the current settings for the attribute selection (search, evaluator)
etc.
|
String |
getRevision()
Returns the revision string.
|
ASSearch |
getSearch()
Get the name of the search method
|
String |
globalInfo()
Returns a string describing this filter
|
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.
|
String |
searchTipText()
Returns the tip text for this property
|
void |
setEvaluator(ASEvaluation evaluator)
set attribute/subset evaluator
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setSearch(ASSearch search)
Set search class
|
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, setInputFormat, toString, useFilter, wekaStaticWrapper
public String globalInfo()
public Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws 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 OptionHandler
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
public String evaluatorTipText()
public void setEvaluator(ASEvaluation evaluator)
evaluator
- the evaluator to usepublic String searchTipText()
public void setSearch(ASSearch search)
search
- the search class to usepublic ASEvaluation getEvaluator()
public ASSearch getSearch()
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Filter
Capabilities
public boolean input(Instance instance) throws Exception
input
in class Filter
instance
- the input instanceIllegalStateException
- 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.public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Filter
public static void main(String[] argv)
argv
- should contain arguments to the filter: use -h for helpCopyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.