public class RandomSearch extends ASSearch implements StartSetHandler, OptionHandler, TechnicalInformationHandler
@inproceedings{Liu1996, author = {H. Liu and R. Setiono}, booktitle = {13th International Conference on Machine Learning}, pages = {319-327}, title = {A probabilistic approach to feature selection - A filter solution}, year = {1996} }Valid options are:
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7. If a start point is supplied, random search evaluates the start point and then randomly looks for subsets that are as good as or better than the start point with the same or lower cardinality.
-F <percent> Percent of search space to consider. (default = 25%).
-V Output subsets as the search progresses. (default = false).
-seed <num> Random seed (default = 1)
Constructor and Description |
---|
RandomSearch()
Constructor
|
Modifier and Type | Method and Description |
---|---|
String[] |
getOptions()
Gets the current settings of RandomSearch.
|
String |
getRevision()
Returns the revision string.
|
double |
getSearchPercent()
get the percentage of the search space to consider
|
int |
getSeed()
Get the random seed to use
|
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.
|
boolean |
getVerbose()
get whether or not output is verbose
|
String |
globalInfo()
Returns a string describing this search method
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
int[] |
search(ASEvaluation ASEval,
Instances data)
Searches the attribute subset space randomly.
|
String |
searchPercentTipText()
Returns the tip text for this property
|
String |
seedTipText()
Returns the tip text for this property
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setSearchPercent(double p)
set the percentage of the search space to consider
|
void |
setSeed(int seed)
Set the random seed to use
|
void |
setStartSet(String startSet)
Sets a starting set of attributes for the search.
|
void |
setVerbose(boolean v)
set whether or not to output new best subsets as the search proceeds
|
String |
startSetTipText()
Returns the tip text for this property
|
String |
toString()
prints a description of the search
|
String |
verboseTipText()
Returns the tip text for this property
|
forName, makeCopies
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
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. If a start point is supplied, random search evaluates the start point and then randomly looks for subsets that are as good as or better than the start point with the same or lower cardinality.
-F <percent> Percent of search space to consider. (default = 25%).
-V Output subsets as the search progresses. (default = false).
-seed <num> Random seed (default = 1)
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 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. "" indicates no start point.
If a start point is supplied, random search evaluates the
start point and then looks for subsets that are as good as or better
than the start point with the same or lower cardinality.Exception
- if start set can't be set.public String getStartSet()
getStartSet
in interface StartSetHandler
public String verboseTipText()
public void setVerbose(boolean v)
v
- true if output is to be verbosepublic boolean getVerbose()
public String searchPercentTipText()
public void setSearchPercent(double p)
p
- percent of the search space ( 0 < p <= 100)public String seedTipText()
public void setSeed(int seed)
seed
- the seed to usepublic int getSeed()
public double getSearchPercent()
public String toString()
public int[] search(ASEvaluation ASEval, Instances data) throws Exception
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class ASSearch
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.