public class RandomSearch extends AbstractMultiThreadedSearch
-sample-size <num> The size (in percent) of the sample to search the inital space with. (default: 100)
-num-folds <num> The number of cross-validation folds for the search space. Numbers smaller than 2 turn off cross-validation and just perform evaluation on the training set. (default: 2)
-test-set <filename> The (optional) test set to use for the search space. Gets ignored if pointing to a file. Overrides cross-validation. (default: .)
-num-iterations <num> The number parameter settings that are tried (i.e., number of points in the search space are checked). (default: 100)
-S <num> The random seed
-num-slots <num> Number of execution slots. (default 1 - i.e. no parallelism)
-D Whether to enable debugging output. (default off)General notes:
AbstractSearch.SearchResult| Constructor and Description |
|---|
RandomSearch() |
| Modifier and Type | Method and Description |
|---|---|
AbstractSearch.SearchResult |
doSearch(weka.core.Instances data)
Performs the actual search and returns the best setup.
|
int |
getNumIterations()
Gets the number of iterations.
|
String[] |
getOptions()
returns the options of the current setup.
|
Vector<Performance> |
getPerformances()
Returns the performances of the last determineBestInSpace run, if
this was ran with postClean argument set to false (for testing)
|
int |
getRandomSeed()
Gets the number of iterations.
|
double |
getSampleSizePercent()
Gets the sample size for the search space search.
|
int |
getSearchSpaceNumFolds()
Gets the number of CV folds for the search space.
|
File |
getSearchSpaceTestSet()
Gets the test set to use for the search space.
|
String |
globalInfo()
Returns a string describing the object.
|
Enumeration |
listOptions()
Gets an enumeration describing the available options.
|
String |
numIterationsTipText()
Returns the tip text for this property.
|
String |
randomSeedTipText()
Returns the tip text for this property.
|
String |
sampleSizePercentTipText()
Returns the tip text for this property.
|
String |
searchSpaceNumFoldsTipText()
Returns the tip text for this property.
|
String |
searchSpaceTestSetTipText()
Returns the tip text for this property.
|
void |
setNumIterations(int value)
Sets the number of iterations.
|
void |
setOptions(String[] options)
Parses the options for this object.
|
void |
setRandomSeed(int value)
Sets the random seed.
|
void |
setSampleSizePercent(double value)
Sets the sample size for the search space search.
|
void |
setSearchSpaceNumFolds(int value)
Sets the number of CV folds for the search space.
|
void |
setSearchSpaceTestSet(File value)
Sets the test set to use folds for the search space.
|
cleanUpSearch, getNumExecutionSlots, numExecutionSlotsTipText, preSearch, setNumExecutionSlotsaddPerformance, clone, debugTipText, getCommandline, getDebug, getSearchDimensions, getTrace, getTraceClassifierAsCli, getTraceFolds, getTraceParameterSettings, getTraceSize, getTraceValue, getValues, log, log, postSearch, retrieveOwner, search, setDebug, setOwnerpublic String globalInfo()
AbstractSearchglobalInfo in class AbstractSearchpublic Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class AbstractMultiThreadedSearchpublic String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class AbstractMultiThreadedSearchpublic void setOptions(String[] options) throws Exception
setOptions in interface weka.core.OptionHandlersetOptions in class AbstractMultiThreadedSearchoptions - the options to useException - if setting of options failspublic String sampleSizePercentTipText()
public double getSampleSizePercent()
public void setSampleSizePercent(double value)
value - the sample size for the search space search.public String searchSpaceNumFoldsTipText()
public int getSearchSpaceNumFolds()
public void setSearchSpaceNumFolds(int value)
value - the number of folds.public String searchSpaceTestSetTipText()
public File getSearchSpaceTestSet()
public void setSearchSpaceTestSet(File value)
value - the test set, ignored if dir.public String numIterationsTipText()
public int getNumIterations()
public void setNumIterations(int value)
value - the test set, ignored if dir.public String randomSeedTipText()
public int getRandomSeed()
public void setRandomSeed(int value)
value - the random seedpublic Vector<Performance> getPerformances()
public AbstractSearch.SearchResult doSearch(weka.core.Instances data) throws Exception
doSearch in class AbstractSearchdata - the dataset to useException - if search failsCopyright © 2021 University of Waikato, Hamilton, NZ. All Rights Reserved.