Number of non improving nodes to consider before terminating search.
(default = 5).
- Version:
- $Revision: 1.19 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
- See Also:
- Serialized Form
TAGS_SELECTION
public static final Tag[] TAGS_SELECTION
BestFirst
public BestFirst()
- Constructor
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
listOptions
public Enumeration listOptions()
- Returns an enumeration describing the available options
- Specified by:
listOptions
in interface OptionHandler
- Returns:
- an enumeration of all the available options
setOptions
public void setOptions(String[] options)
throws Exception
- Parses a given list of options.
Valid options are:
-P
Specify a starting set of attributes. Eg 1,4,7-9.
-D <-1 = backward | 0 = bidirectional | 1 = forward>
Direction of the search. (default = 1).
-N
Number of non improving nodes to consider before terminating search.
(default = 5).
- Specified by:
setOptions
in interface OptionHandler
- Parameters:
options
- the list of options as an array of strings
- Throws:
Exception
- if an option is not supported
startSetTipText
public String startSetTipText()
- Returns the tip text for this property
- Returns:
- tip text for this property suitable for
displaying in the explorer/experimenter gui
setStartSet
public void setStartSet(String startSet)
throws Exception
- Sets a starting set of attributes for the search. It is the
search method's responsibility to report this start set (if any)
in its toString() method.
- Specified by:
setStartSet
in interface StartSetHandler
- Parameters:
startSet
- a string containing a list of attributes (and or ranges),
eg. 1,2,6,10-15.
- Throws:
Exception
- if start set can't be set.
getStartSet
public String getStartSet()
- Returns a list of attributes (and or attribute ranges) as a String
- Specified by:
getStartSet
in interface StartSetHandler
- Returns:
- a list of attributes (and or attribute ranges)
searchTerminationTipText
public String searchTerminationTipText()
- Returns the tip text for this property
- Returns:
- tip text for this property suitable for
displaying in the explorer/experimenter gui
setSearchTermination
public void setSearchTermination(int t)
throws Exception
- Set the numnber of non-improving nodes to consider before terminating
search.
- Parameters:
t
- the number of non-improving nodes
- Throws:
Exception
- if t is less than 1
getSearchTermination
public int getSearchTermination()
- Get the termination criterion (number of non-improving nodes).
- Returns:
- the number of non-improving nodes
directionTipText
public String directionTipText()
- Returns the tip text for this property
- Returns:
- tip text for this property suitable for
displaying in the explorer/experimenter gui
setDirection
public void setDirection(SelectedTag d)
- Set the search direction
- Parameters:
d
- the direction of the search
getDirection
public SelectedTag getDirection()
- Get the search direction
- Returns:
- the direction of the search
getOptions
public String[] getOptions()
- Gets the current settings of BestFirst.
- Specified by:
getOptions
in interface OptionHandler
- Returns:
- an array of strings suitable for passing to setOptions()
toString
public String toString()
- returns a description of the search as a String
- Overrides:
toString
in class Object
- Returns:
- a description of the search
search
public int[] search(ASEvaluation ASEval,
Instances data)
throws Exception
- Searches the attribute subset space by best first search
- Specified by:
search
in class ASSearch
- Parameters:
data
- the training instances.ASEval
- the attribute evaluator to guide the search
- Returns:
- an array (not necessarily ordered) of selected attribute indexes
- Throws:
Exception
- if the search can't be completed
resetOptions
protected void resetOptions()
- Reset options to default values