public abstract class AbstractSearch extends Object implements Serializable, Cloneable, weka.core.OptionHandler, TraceableOptimizer
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSearch.SearchResult
Container class for the search results.
|
| Constructor and Description |
|---|
AbstractSearch() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPerformance(Performance performance,
int folds)
Adds the performance to the cache and the current list of performances.
|
void |
cleanUpSearch()
Called after the search regardless whether successful or failed.
|
Object |
clone()
Returns a clone of itself.
|
String |
debugTipText()
Returns the tip text for this property
|
abstract AbstractSearch.SearchResult |
doSearch(weka.core.Instances data)
Performs the actual search and returns the best setup.
|
String |
getCommandline(Object obj)
Returns the commandline of the given object.
|
boolean |
getDebug()
Get whether debugging is turned on.
|
String[] |
getOptions()
returns the options of the current setup.
|
List<String> |
getSearchDimensions()
Returns the search dimensions
|
List<Map.Entry<Integer,Performance>> |
getTrace()
Returns the full trace.
|
String |
getTraceClassifierAsCli(int index)
Returns the CLI string of a given item in the trace.
|
Integer |
getTraceFolds(int index)
Returns the folds of a given item in the trace.
|
List<Map.Entry<String,Object>> |
getTraceParameterSettings(int index)
Returns the parameter settings in structured way
|
int |
getTraceSize()
Returns the size of m_Trace, which is technically the amount of
setups that where tested in order to find the best.
|
Double |
getTraceValue(int index)
Returns the performance score of a given item in the trace.
|
Point<Object> |
getValues()
returns the parameter values that were found to work best.
|
abstract String |
globalInfo()
Returns a string describing the object.
|
Enumeration |
listOptions()
Gets an enumeration describing the available options.
|
void |
log(String message)
prints the specified message to stdout if debug is on and can also dump
the message to a log file.
|
void |
log(String message,
boolean onlyLog)
prints the specified message to stdout if debug is on and can also dump
the message to a log file.
|
AbstractSearch.SearchResult |
postSearch(weka.core.Instances data,
AbstractSearch.SearchResult best)
Called after the search has been executed.
|
void |
preSearch(weka.core.Instances data)
Called before the search is executed.
|
MultiSearchCapable |
retrieveOwner()
Returns the current owner.
|
AbstractSearch.SearchResult |
search(weka.core.Instances data)
Performs the search and returns the best setup.
|
void |
setDebug(boolean debug)
Set debugging mode.
|
void |
setOptions(String[] options)
Parses the options for this object.
|
void |
setOwner(MultiSearchCapable value)
Sets the owning classifier.
|
public abstract String globalInfo()
public void setOwner(MultiSearchCapable value)
value - the ownerpublic List<String> getSearchDimensions()
public MultiSearchCapable retrieveOwner()
public Object clone()
public Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerpublic String[] getOptions()
getOptions in interface weka.core.OptionHandlerpublic void setOptions(String[] options) throws Exception
setOptions in interface weka.core.OptionHandleroptions - the options to useException - if setting of options failspublic void setDebug(boolean debug)
debug - true if debug output should be printedpublic boolean getDebug()
public String debugTipText()
public void log(String message)
message - the message to print or store in a log filepublic void log(String message, boolean onlyLog)
message - the message to print or store in a log fileonlyLog - if true the message will only be put into the log file
but not to stdoutpublic void addPerformance(Performance performance, int folds)
performance - the performance to addfolds - the number of foldspublic Point<Object> getValues()
public int getTraceSize()
getTraceSize in interface TraceableOptimizerpublic String getTraceClassifierAsCli(int index)
getTraceClassifierAsCli in interface TraceableOptimizerindex - the index of the trace item to obtainpublic Double getTraceValue(int index)
getTraceValue in interface TraceableOptimizerindex - the index of the trace item to obtainpublic Integer getTraceFolds(int index)
getTraceFolds in interface TraceableOptimizerindex - the index of the trace item to obtainpublic List<Map.Entry<String,Object>> getTraceParameterSettings(int index)
getTraceParameterSettings in interface TraceableOptimizerindex - the index of the trace item to obtainpublic List<Map.Entry<Integer,Performance>> getTrace()
getTrace in interface TraceableOptimizerpublic String getCommandline(Object obj)
obj - the object to create the commandline forpublic void preSearch(weka.core.Instances data)
throws Exception
data - the dataset to useException - if search failspublic abstract AbstractSearch.SearchResult doSearch(weka.core.Instances data) throws Exception
data - the dataset to useException - if search failspublic AbstractSearch.SearchResult postSearch(weka.core.Instances data, AbstractSearch.SearchResult best) throws Exception
data - the dataset to usebest - the best classifier setupException - if search failspublic AbstractSearch.SearchResult search(weka.core.Instances data) throws Exception
data - the dataset to useException - if search failspublic void cleanUpSearch()
Copyright © 2017 University of Waikato, Hamilton, NZ. All Rights Reserved.