public class BestFirst extends ASSearch implements OptionHandler, StartSetHandler
-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)
Modifier and Type | Class and Description |
---|---|
class |
BestFirst.Link2
Class for a node in a linked list.
|
class |
BestFirst.LinkedList2
Class for handling a linked list.
|
Modifier and Type | Field and Description |
---|---|
static Tag[] |
TAGS_SELECTION
search directions
|
Constructor and Description |
---|
BestFirst()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
directionTipText()
Returns the tip text for this property
|
SelectedTag |
getDirection()
Get the search direction
|
int |
getLookupCacheSize()
Return the maximum size of the evaluated subset cache (expressed as a multiplier
for the number of attributes in a data set.
|
java.lang.String[] |
getOptions()
Gets the current settings of BestFirst.
|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getSearchTermination()
Get the termination criterion (number of non-improving nodes).
|
java.lang.String |
getStartSet()
Returns a list of attributes (and or attribute ranges) as a String
|
java.lang.String |
globalInfo()
Returns a string describing this search method
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
java.lang.String |
lookupCacheSizeTipText()
Returns the tip text for this property
|
int[] |
search(ASEvaluation ASEval,
Instances data)
Searches the attribute subset space by best first search
|
java.lang.String |
searchTerminationTipText()
Returns the tip text for this property
|
void |
setDirection(SelectedTag d)
Set the search direction
|
void |
setLookupCacheSize(int size)
Set the maximum size of the evaluated subset cache (hashtable).
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setSearchTermination(int t)
Set the numnber of non-improving nodes to consider before terminating
search.
|
void |
setStartSet(java.lang.String startSet)
Sets a starting set of attributes for the search.
|
java.lang.String |
startSetTipText()
Returns the tip text for this property
|
java.lang.String |
toString()
returns a description of the search as a String
|
forName, makeCopies
public static final Tag[] TAGS_SELECTION
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
-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 stringsjava.lang.Exception
- if an option is not supportedpublic void setLookupCacheSize(int size)
size
- the maximum size of the hashtablepublic int getLookupCacheSize()
public java.lang.String lookupCacheSizeTipText()
public java.lang.String startSetTipText()
public void setStartSet(java.lang.String startSet) throws java.lang.Exception
setStartSet
in interface StartSetHandler
startSet
- a string containing a list of attributes (and or ranges),
eg. 1,2,6,10-15.java.lang.Exception
- if start set can't be set.public java.lang.String getStartSet()
getStartSet
in interface StartSetHandler
public java.lang.String searchTerminationTipText()
public void setSearchTermination(int t) throws java.lang.Exception
t
- the number of non-improving nodesjava.lang.Exception
- if t is less than 1public int getSearchTermination()
public java.lang.String directionTipText()
public void setDirection(SelectedTag d)
d
- the direction of the searchpublic SelectedTag getDirection()
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String toString()
toString
in class java.lang.Object
public int[] search(ASEvaluation ASEval, Instances data) throws java.lang.Exception
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class ASSearch