public class Ranker extends ASSearch implements RankedOutputSearch, StartSetHandler, OptionHandler
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7. Any starting attributes specified are ignored during the ranking.
-T <threshold> Specify a theshold by which attributes may be discarded from the ranking.
-N <num to select> Specify number of attributes to select
Constructor and Description |
---|
Ranker()
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
generateRankingTipText()
Returns the tip text for this property
|
int |
getCalculatedNumToSelect()
Gets the calculated number to select.
|
boolean |
getGenerateRanking()
This is a dummy method.
|
int |
getNumToSelect()
Gets the number of attributes to be retained.
|
String[] |
getOptions()
Gets the current settings of ReliefFAttributeEval.
|
String |
getRevision()
Returns the revision string.
|
String |
getStartSet()
Returns a list of attributes (and or attribute ranges) as a String
|
double |
getThreshold()
Returns the threshold so that the AttributeSelection module can
discard attributes from the ranking.
|
String |
globalInfo()
Returns a string describing this search method
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
String |
numToSelectTipText()
Returns the tip text for this property
|
double[][] |
rankedAttributes()
Sorts the evaluated attribute list
|
int[] |
search(ASEvaluation ASEval,
Instances data)
Kind of a dummy search algorithm.
|
void |
setGenerateRanking(boolean doRank)
This is a dummy set method---Ranker is ONLY capable of producing
a ranked list of attributes for attribute evaluators.
|
void |
setNumToSelect(int n)
Specify the number of attributes to select from the ranked list.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setStartSet(String startSet)
Sets a starting set of attributes for the search.
|
void |
setThreshold(double threshold)
Set the threshold by which the AttributeSelection module can discard
attributes.
|
String |
startSetTipText()
Returns the tip text for this property
|
String |
thresholdTipText()
Returns the tip text for this property
|
String |
toString()
returns a description of the search as a String
|
forName, makeCopies
public String globalInfo()
public String numToSelectTipText()
public void setNumToSelect(int n)
setNumToSelect
in interface RankedOutputSearch
n
- the number of attributes to retainpublic int getNumToSelect()
getNumToSelect
in interface RankedOutputSearch
public int getCalculatedNumToSelect()
getCalculatedNumToSelect
in interface RankedOutputSearch
public String thresholdTipText()
public void setThreshold(double threshold)
setThreshold
in interface RankedOutputSearch
threshold
- the threshold.public double getThreshold()
getThreshold
in interface RankedOutputSearch
public String generateRankingTipText()
public void setGenerateRanking(boolean doRank)
setGenerateRanking
in interface RankedOutputSearch
doRank
- this parameter is N/A and is ignoredpublic boolean getGenerateRanking()
getGenerateRanking
in interface RankedOutputSearch
public String startSetTipText()
public void setStartSet(String startSet) throws Exception
setStartSet
in interface StartSetHandler
startSet
- a string containing a list of attributes (and or ranges),
eg. 1,2,6,10-15.Exception
- if start set can't be set.public String getStartSet()
getStartSet
in interface StartSetHandler
public Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7. Any starting attributes specified are ignored during the ranking.
-T <threshold> Specify a theshold by which attributes may be discarded from the ranking.
-N <num to select> Specify number of attributes to select
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
public int[] search(ASEvaluation ASEval, Instances data) throws Exception
public double[][] rankedAttributes() throws Exception
rankedAttributes
in interface RankedOutputSearch
Exception
- of sorting can't be done.public String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class ASSearch
Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.