All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.attributeSelection.RaceSearch

java.lang.Object
   |
   +----weka.attributeSelection.ASSearch
           |
           +----weka.attributeSelection.RaceSearch

public class RaceSearch
extends ASSearch
implements RankedOutputSearch, OptionHandler
Class for performing a racing search.

For more information see:
Moore, A. W. and Lee, M. S. (1994). Efficient algorithms for minimising cross validation error. Proceedings of the Eleventh International Conference on Machine Learning. pp 190--198.

Valid options are:

-R
0 = forward, 1 = backward, 2 = schemata, 3 = rank.

-L
significance level to use for t-tests.

-T
threshold for considering mean errors of two subsets the same

-F
0 = 10 fold, 1 = leave-one-out (selected automatically for schemata race

-A
the attribute evaluator to use when doing a rank search

-Q
produce a ranked list of attributes. Selecting this option forces the race type to be forward. Racing continues until *all* attributes have been selected, thus producing a ranked list of attributes.

-N
Specify the number of attributes to retain. Overides any threshold. Use in conjunction with -Q.

-J
Specify a threshold by which the AttributeSelection module can discard attributes. Use in conjunction with -Q.

-Z
Turn on verbose output for monitoring the search

Author:
Mark Hall (mhall@cs.waikato.ac.nz)

Variable Index

 o TAGS_SELECTION
 o XVALTAGS_SELECTION

Constructor Index

 o RaceSearch()

Method Index

 o attributeEvaluatorTipText()
Returns the tip text for this property
 o debugTipText()
Returns the tip text for this property
 o foldsTipText()
Returns the tip text for this property
 o generateRankingTipText()
Returns the tip text for this property
 o getAttributeEvaluator()
Get the attribute evaluator used to generate the ranking.
 o getCalculatedNumToSelect()
Gets the calculated number of attributes to retain.
 o getDebug()
Get whether output is to be verbose
 o getFoldsType()
Get the xfold type
 o getGenerateRanking()
Gets whether ranking has been requested.
 o getNumToSelect()
Gets the number of attributes to be retained.
 o getOptions()
Gets the current settings of BestFirst.
 o getRaceType()
Get the race type
 o getSelectionThreshold()
Returns the threshold so that the AttributeSelection module can discard attributes from the ranking.
 o getSignificanceLevel()
Get the significance level
 o getThreshold()
Get the threshold
 o globalInfo()
Returns a string describing this search method
 o listOptions()
Returns an enumeration describing the available options
 o numToSelectTipText()
Returns the tip text for this property
 o raceTypeTipText()
Returns the tip text for this property
 o rankedAttributes()
 o search(ASEvaluation, Instances)
Searches the attribute subset space by racing cross validation errors of competing subsets
 o selectionThresholdTipText()
Returns the tip text for this property
 o setAttributeEvaluator(ASEvaluation)
Set the attribute evaluator to use for generating the ranking.
 o setDebug(boolean)
Set whether verbose output should be generated.
 o setFoldsType(SelectedTag)
Set the xfold type
 o setGenerateRanking(boolean)
Records whether the user has requested a ranked list of attributes.
 o setNumToSelect(int)
Specify the number of attributes to select from the ranked list (if generating a ranking).
 o setOptions(String[])
Parses a given list of options.
 o setRaceType(SelectedTag)
Set the race type
 o setSelectionThreshold(double)
Set the threshold by which the AttributeSelection module can discard attributes.
 o setSignificanceLevel(double)
Sets the significance level to use
 o setThreshold(double)
Sets the threshold for comparisons
 o significanceLevelTipText()
Returns the tip text for this property
 o thresholdTipText()
Returns the tip text for this property
 o toString()

Variables

 o TAGS_SELECTION
 public static final Tag TAGS_SELECTION[]
 o XVALTAGS_SELECTION
 public static final Tag XVALTAGS_SELECTION[]

Constructors

 o RaceSearch
 public RaceSearch()

Methods

 o globalInfo
 public String globalInfo()
Returns a string describing this search method

Returns:
a description of the search method suitable for displaying in the explorer/experimenter gui
 o raceTypeTipText
 public String raceTypeTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setRaceType
 public void setRaceType(SelectedTag d)
Set the race type

Parameters:
d - the type of race
 o getRaceType
 public SelectedTag getRaceType()
Get the race type

Returns:
the type of race
 o significanceLevelTipText
 public String significanceLevelTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setSignificanceLevel
 public void setSignificanceLevel(double sig)
Sets the significance level to use

Parameters:
sig - the significance level
 o getSignificanceLevel
 public double getSignificanceLevel()
Get the significance level

Returns:
the current significance level
 o thresholdTipText
 public String thresholdTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setThreshold
 public void setThreshold(double t)
Sets the threshold for comparisons

Parameters:
t - the threshold to use
 o getThreshold
 public double getThreshold()
Get the threshold

Returns:
the current threshold
 o foldsTipText
 public String foldsTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setFoldsType
 public void setFoldsType(SelectedTag d)
Set the xfold type

Parameters:
d - the type of xval
 o getFoldsType
 public SelectedTag getFoldsType()
Get the xfold type

Returns:
the type of xval
 o debugTipText
 public String debugTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setDebug
 public void setDebug(boolean d)
Set whether verbose output should be generated.

Parameters:
d - true if output is to be verbose.
 o getDebug
 public boolean getDebug()
Get whether output is to be verbose

Returns:
true if output will be verbose
 o attributeEvaluatorTipText
 public String attributeEvaluatorTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setAttributeEvaluator
 public void setAttributeEvaluator(ASEvaluation newEvaluator)
Set the attribute evaluator to use for generating the ranking.

Parameters:
newEvaluator - the attribute evaluator to use.
 o getAttributeEvaluator
 public ASEvaluation getAttributeEvaluator()
Get the attribute evaluator used to generate the ranking.

Returns:
the evaluator used to generate the ranking.
 o generateRankingTipText
 public String generateRankingTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setGenerateRanking
 public void setGenerateRanking(boolean doRank)
Records whether the user has requested a ranked list of attributes.

Parameters:
doRank - true if ranking is requested
 o getGenerateRanking
 public boolean getGenerateRanking()
Gets whether ranking has been requested. This is used by the AttributeSelection module to determine if rankedAttributes() should be called.

Returns:
true if ranking has been requested.
 o numToSelectTipText
 public String numToSelectTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setNumToSelect
 public void setNumToSelect(int n)
Specify the number of attributes to select from the ranked list (if generating a ranking). -1 indicates that all attributes are to be retained.

Parameters:
n - the number of attributes to retain
 o getNumToSelect
 public int getNumToSelect()
Gets the number of attributes to be retained.

Returns:
the number of attributes to retain
 o getCalculatedNumToSelect
 public int getCalculatedNumToSelect()
Gets the calculated number of attributes to retain. This is the actual number of attributes to retain. This is the same as getNumToSelect if the user specifies a number which is not less than zero. Otherwise it should be the number of attributes in the (potentially transformed) data.

 o selectionThresholdTipText
 public String selectionThresholdTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setSelectionThreshold
 public void setSelectionThreshold(double threshold)
Set the threshold by which the AttributeSelection module can discard attributes.

Parameters:
threshold - the threshold.
 o getSelectionThreshold
 public double getSelectionThreshold()
Returns the threshold so that the AttributeSelection module can discard attributes from the ranking.

 o listOptions
 public Enumeration listOptions()
Returns an enumeration describing the available options

Returns:
an enumeration of all the available options
 o setOptions
 public void setOptions(String options[]) throws Exception
Parses a given list of options. Valid options are:

-R
0 = forward, 1 = backward, 2 = schemata, 3 = rank.

-L
significance level to use for t-tests.

-T
threshold for considering mean errors of two subsets the same

-F
0 = 10 fold, 1 = leave-one-out (selected automatically for schemata race

-A
the attribute evaluator to use when doing a rank search

-Q
produce a ranked list of attributes. Selecting this option forces the race type to be forward. Racing continues until *all* attributes have been selected, thus producing a ranked list of attributes.

-N
Specify the number of attributes to retain. Overides any threshold. Use in conjunction with -Q.

-J
Specify a threshold by which the AttributeSelection module can discard attributes. Use in conjunction with -Q.

-Z
Turn on verbose output for monitoring the search

Parameters:
options - the list of options as an array of strings
Throws: Exception
if an option is not supported
 o getOptions
 public String[] getOptions()
Gets the current settings of BestFirst.

Returns:
an array of strings suitable for passing to setOptions()
 o search
 public int[] search(ASEvaluation ASEval,
                     Instances data) throws Exception
Searches the attribute subset space by racing cross validation errors of competing subsets

Parameters:
ASEvaluator - the attribute evaluator to guide the search
data - the training instances.
Returns:
an array (not necessarily ordered) of selected attribute indexes
Throws: Exception
if the search can't be completed
Overrides:
search in class ASSearch
 o rankedAttributes
 public double[][] rankedAttributes() throws Exception
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home