public class RankSearch
extends weka.attributeSelection.ASSearch
implements weka.core.OptionHandler, weka.core.TechnicalInformationHandler
-A <attribute evaluator> class name of attribute evaluator to use for ranking. Place any evaluator options LAST on the command line following a "--". eg.: -A weka.attributeSelection.GainRatioAttributeEval ... -- -M (default: weka.attributeSelection.GainRatioAttributeEval)
-S <step size> number of attributes to be added from the ranking in each iteration (default = 1).
-R <start point> point in the ranking to start evaluating from. (default = 0, ie. the head of the ranking).
Options specific to evaluator weka.attributeSelection.GainRatioAttributeEval:
-M treat missing values as a separate value.
Constructor and Description |
---|
RankSearch()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
attributeEvaluatorTipText()
Returns the tip text for this property
|
java.lang.String |
debuggingOutputTipText()
Returns the tip text for this property
|
java.lang.String |
excludeNonImprovingAttributesTipText()
Returns the tip text for this property
|
weka.attributeSelection.ASEvaluation |
getAttributeEvaluator()
Get the attribute evaluator used to generate the ranking.
|
boolean |
getDebuggingOutput()
Get whether to output debugging info to the console
|
boolean |
getExcludeNonImprovingAttributes()
Get whether or not to add prior non-improving attributes when considering
more attributes from the ranked list
|
double |
getImprovementThreshold()
Get merit improvement threshold
|
int |
getNonImprovingAdditions()
Get the number of consecutive non-improving additions to tolerate before
terminating the search
|
java.lang.String[] |
getOptions()
Gets the current settings of WrapperSubsetEval.
|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getStartPoint()
Get the point at which to start evaluating the ranking
|
int |
getStepSize()
Get the number of attributes to add from the rankining in each iteration
|
weka.core.TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed
information about the technical background of this class, e.g., paper
reference or book this class is based on.
|
java.lang.String |
globalInfo()
Returns a string describing this search method
|
java.lang.String |
improvementThresholdTipText()
Returns the tip text for this property
|
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
java.lang.String |
nonImprovingAdditionsTipText()
Returns the tip text for this property
|
int[] |
search(weka.attributeSelection.ASEvaluation ASEval,
weka.core.Instances data)
Ranks attributes using the specified attribute evaluator and then searches
the ranking using the supplied subset evaluator.
|
void |
setAttributeEvaluator(weka.attributeSelection.ASEvaluation newEvaluator)
Set the attribute evaluator to use for generating the ranking.
|
void |
setDebuggingOutput(boolean d)
Set whether to output debugging info to the console
|
void |
setExcludeNonImprovingAttributes(boolean b)
Set whether or not to add prior non-improving attributes when considering
more attributes from the ranked list
|
void |
setImprovementThreshold(double t)
Set merit improvement threshold
|
void |
setNonImprovingAdditions(int t)
Set the number of consecutive non-improving additions to tolerate before
terminating the search
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setStartPoint(int sp)
Set the point at which to start evaluating the ranking
|
void |
setStepSize(int ss)
Set the number of attributes to add from the rankining in each iteration
|
java.lang.String |
startPointTipText()
Returns the tip text for this property
|
java.lang.String |
stepSizeTipText()
Returns the tip text for this property
|
java.lang.String |
toString()
returns a description of the search as a String
|
public java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface weka.core.TechnicalInformationHandler
public java.lang.String attributeEvaluatorTipText()
public void setAttributeEvaluator(weka.attributeSelection.ASEvaluation newEvaluator)
newEvaluator
- the attribute evaluator to use.public weka.attributeSelection.ASEvaluation getAttributeEvaluator()
public java.lang.String stepSizeTipText()
public void setStepSize(int ss)
ss
- the number of attribes to add.public int getStepSize()
public java.lang.String startPointTipText()
public void setStartPoint(int sp)
sp
- the position in the ranking to start atpublic int getStartPoint()
public java.lang.String debuggingOutputTipText()
public void setDebuggingOutput(boolean d)
d
- true if dubugging info is to be outputpublic boolean getDebuggingOutput()
public java.lang.String improvementThresholdTipText()
public void setImprovementThreshold(double t)
t
- improvement thresholdpublic double getImprovementThreshold()
public java.lang.String excludeNonImprovingAttributesTipText()
public void setExcludeNonImprovingAttributes(boolean b)
b
- true if prior non-improving attributes should be omittedpublic boolean getExcludeNonImprovingAttributes()
public java.lang.String nonImprovingAdditionsTipText()
public void setNonImprovingAdditions(int t)
t
- the number of non-improving additions to allowpublic int getNonImprovingAdditions()
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.attributeSelection.ASSearch
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-A <attribute evaluator> class name of attribute evaluator to use for ranking. Place any evaluator options LAST on the command line following a "--". eg.: -A weka.attributeSelection.GainRatioAttributeEval ... -- -M (default: weka.attributeSelection.GainRatioAttributeEval)
-S <step size> number of attributes to be added from the ranking in each iteration (default = 1).
-R <start point> point in the ranking to start evaluating from. (default = 0, ie. the head of the ranking).
Options specific to evaluator weka.attributeSelection.GainRatioAttributeEval:
-M treat missing values as a seperate value.
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.attributeSelection.ASSearch
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class weka.attributeSelection.ASSearch
public int[] search(weka.attributeSelection.ASEvaluation ASEval, weka.core.Instances data) throws java.lang.Exception
search
in class weka.attributeSelection.ASSearch
ASEval
- the subset evaluator to guide the searchdata
- the training instances.java.lang.Exception
- if the search can't be completedpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.attributeSelection.ASSearch