All Packages Class Hierarchy This Package Previous Next Index WEKA's home
java.lang.Object | +----weka.attributeSelection.ASSearch | +----weka.attributeSelection.ForwardSelection
Valid options are:
-P
-R
-T
-P
-R
-T
-N
Specify a starting set of attributes. Eg 1,4,7-9.
Produce a ranked list of attributes.
Specify a threshold by which the AttributeSelection module can.
discard attributes. Use in conjunction with -R
generateRankingTipText()
getCalculatedNumToSelect()
getGenerateRanking()
getNumToSelect()
getOptions()
getStartSet()
getThreshold()
globalInfo()
listOptions()
numToSelectTipText()
rankedAttributes()
search(ASEvaluation, Instances)
setGenerateRanking(boolean)
setNumToSelect(int)
setOptions(String[])
setStartSet(String)
setThreshold(double)
startSetTipText()
thresholdTipText()
toString()
ForwardSelection
public ForwardSelection()
globalInfo
public java.lang.String globalInfo()
Returns a string describing this search method
thresholdTipText
public java.lang.String thresholdTipText()
Returns the tip text for this property
setThreshold
public void setThreshold(double threshold)
Set the threshold by which the AttributeSelection module can discard
attributes.
threshold
- the threshold.
getThreshold
public double getThreshold()
Returns the threshold so that the AttributeSelection module can
discard attributes from the ranking.
numToSelectTipText
public java.lang.String numToSelectTipText()
Returns the tip text for this property
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.
n
- the number of attributes to retain
getNumToSelect
public int getNumToSelect()
Gets the number of attributes to be retained.
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.
generateRankingTipText
public java.lang.String generateRankingTipText()
Returns the tip text for this property
setGenerateRanking
public void setGenerateRanking(boolean doRank)
Records whether the user has requested a ranked list of attributes.
doRank
- true if ranking is requested
getGenerateRanking
public boolean getGenerateRanking()
Gets whether ranking has been requested. This is used by the
AttributeSelection module to determine if rankedAttributes()
should be called.
startSetTipText
public java.lang.String startSetTipText()
Returns the tip text for this property
setStartSet
public void setStartSet(java.lang.String startSet) throws java.lang.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.
startSet
- a string containing a list of attributes (and or ranges),
eg. 1,2,6,10-15.
getStartSet
public java.lang.String getStartSet()
Returns a list of attributes (and or attribute ranges) as a String
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options
setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
Parses a given list of options.
Valid options are:
Specify a starting set of attributes. Eg 1,4,7-9.
Produce a ranked list of attributes.
Specify a threshold by which the AttributeSelection module can
discard attributes. Use in conjunction with -R
Specify the number of attributes to retain. Overides any threshold.
options
- the list of options as an array of strings
getOptions
public java.lang.String[] getOptions()
Gets the current settings of ReliefFAttributeEval.
toString
public java.lang.String toString()
returns a description of the search.
search
public int[] search(ASEvaluation ASEval,
Instances data) throws java.lang.Exception
Searches the attribute subset space by forward selection.
rankedAttributes
public double[][] rankedAttributes() throws java.lang.Exception
Produces a ranked list of attributes. Search must have been performed
prior to calling this function. Search is called by this function to
complete the traversal of the the search space. A list of
attributes and merits are returned. The attributes a ranked by the
order they are added to the subset during a forward selection search.
Individual merit values reflect the merit associated with adding the
corresponding attribute to the subset; because of this, merit values
may initially increase but then decrease as the best subset is
"passed by" on the way to the far side of the search space.
All Packages Class Hierarchy This Package Previous Next Index WEKA's home