public class LinearForwardSelection extends ASSearch implements OptionHandler, StartSetHandler, TechnicalInformationHandler
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7.
-D <0 = forward selection | 1 = floating forward selection> Forward selection method. (default = 0).
-N <num> Number of non-improving nodes to consider before terminating search.
-I Perform initial ranking to select the top-ranked attributes.
-K <num> Number of top-ranked attributes that are taken into account by the search.
-T <0 = fixed-set | 1 = fixed-width> Type of Linear Forward Selection (default = 0).
-S <num> Size of lookup cache for evaluated subsets. Expressed as a multiple of the number of attributes in the data set. (default = 1)
-Z verbose on/off
Modifier and Type | Field and Description |
---|---|
static Tag[] |
TAGS_SEARCH_METHOD |
static Tag[] |
TAGS_TYPE |
Constructor and Description |
---|
LinearForwardSelection()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
forwardSelectionMethodTipText()
Returns the tip text for this property
|
SelectedTag |
getForwardSelectionMethod()
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.
|
int |
getNumUsedAttributes()
Get the number of top-ranked attributes that taken into account by the
search process.
|
java.lang.String[] |
getOptions()
Gets the current settings of LinearForwardSelection.
|
boolean |
getPerformRanking()
Get boolean if initial ranking should be performed to select the
top-ranked attributes
|
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
|
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.
|
SelectedTag |
getType()
Get the type
|
boolean |
getVerbose()
Get whether output is to be verbose
|
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
|
java.lang.String |
numUsedAttributesTipText()
Returns the tip text for this property
|
java.lang.String |
performRankingTipText()
Returns the tip text for this property
|
int[] |
search(ASEvaluation ASEval,
Instances data)
Searches the attribute subset space by linear forward selection
|
java.lang.String |
searchTerminationTipText()
Returns the tip text for this property
|
void |
setForwardSelectionMethod(SelectedTag d)
Set the search direction
|
void |
setLookupCacheSize(int size)
Set the maximum size of the evaluated subset cache (hashtable).
|
void |
setNumUsedAttributes(int k)
Set the number of top-ranked attributes that taken into account by the
search process.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setPerformRanking(boolean b)
Perform initial ranking to select top-ranked attributes.
|
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.
|
void |
setType(SelectedTag t)
Set the type
|
void |
setVerbose(boolean b)
Set whether verbose output should be generated.
|
java.lang.String |
startSetTipText()
Returns the tip text for this property
|
java.lang.String |
toString()
returns a description of the search as a String
|
java.lang.String |
typeTipText()
Returns the tip text for this property
|
java.lang.String |
verboseTipText()
Returns the tip text for this property
|
forName, makeCopies
public static final Tag[] TAGS_SEARCH_METHOD
public static final Tag[] TAGS_TYPE
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-P
-D <0 = forward selection | 1 = floating forward selection>
-N
-I
-K
-T <0 = fixed-set | 1 = fixed-width>
-S
-Z
Specify a starting set of attributes. Eg 1,4,7-9.
Forward selection method of the search. (default = 0).
Number of non improving nodes to consider before terminating search.
(default = 5).
Perform initial ranking to select top-ranked attributes.
Number of top-ranked attributes that are taken into account.
Typ of Linear Forward Selection (default = 0).
Size of lookup cache for evaluated subsets. Expressed as a multiple of
the number of attributes in the data set. (default = 1).
verbose on/off.
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 performRankingTipText()
public void setPerformRanking(boolean b)
b
- true if initial ranking should be performedpublic boolean getPerformRanking()
public java.lang.String numUsedAttributesTipText()
public void setNumUsedAttributes(int k) throws java.lang.Exception
k
- the number of attributesjava.lang.Exception
- if k is less than 2public int getNumUsedAttributes()
public java.lang.String forwardSelectionMethodTipText()
public void setForwardSelectionMethod(SelectedTag d)
d
- the direction of the searchpublic SelectedTag getForwardSelectionMethod()
public java.lang.String typeTipText()
public void setType(SelectedTag t)
t
- the Linear Forward Selection typepublic SelectedTag getType()
public java.lang.String verboseTipText()
public void setVerbose(boolean b)
d
- true if output is to be verbose.public boolean getVerbose()
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