public class RepeatedRuns extends AbstractMetaEvaluator implements ThreadLimiter
Modifier and Type | Field and Description |
---|---|
static String |
KEY_RUN
the key for the run number.
|
protected int |
m_ActualNumThreads
the actual number of threads to use.
|
protected ExecutorService |
m_Executor
the executor service to use for parallel execution.
|
protected int |
m_LowerRuns
the lower number of runs (included).
|
protected int |
m_NumThreads
the number of threads to use for parallel execution.
|
protected int |
m_UpperRuns
the upper number of runs (included).
|
m_Evaluator
m_Stopped
m_Debug, m_LogListeners
Constructor and Description |
---|
RepeatedRuns() |
Modifier and Type | Method and Description |
---|---|
List<EvaluationStatistics> |
evaluate(MultiLabelClassifier classifier,
weka.core.Instances dataset)
Returns the evaluation statistics generated for the dataset.
|
protected List<EvaluationStatistics> |
evaluateParallel(MultiLabelClassifier classifier,
weka.core.Instances dataset)
Executes the runs in sequential order.
|
protected List<EvaluationStatistics> |
evaluateSequential(MultiLabelClassifier classifier,
weka.core.Instances dataset)
Executes the runs in sequential order.
|
protected Evaluator |
getDefaultEvaluator()
Returns the default evaluator to use.
|
protected int |
getDefaultLowerRuns()
Returns the default lower number of runs to perform.
|
protected int |
getDefaultNumThreads()
Returns the default number of threads to use.
|
protected int |
getDefaultUpperRuns()
Returns the default upper number of runs to perform.
|
int |
getLowerRuns()
Returns the lower number of runs to perform (included).
|
int |
getNumThreads()
Returns the number of threads to use.
|
String[] |
getOptions()
Returns the options.
|
int |
getUpperRuns()
Returns the upper number of runs to perform (included).
|
String |
globalInfo()
Description to be displayed in the GUI.
|
Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration of all the available options..
|
String |
lowerRunsTipText()
Describes this property.
|
String |
numThreadsTipText()
Returns the tip text for this property.
|
void |
setLowerRuns(int value)
Sets the lower number of runs to perform (included).
|
void |
setNumThreads(int value)
Sets the number of threads to use.
|
void |
setOptions(String[] options)
Sets the options.
|
void |
setUpperRuns(int value)
Sets the upper number of runs to perform (included).
|
void |
stop()
Stops the evaluation, if possible.
|
String |
upperRunsTipText()
Describes this property.
|
addLogListener, evaluatorTipText, getEvaluator, initialize, removeLogListener, setEvaluator
debug, getLogListeners, handleException, log
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
log
public static final String KEY_RUN
protected int m_LowerRuns
protected int m_UpperRuns
protected int m_NumThreads
protected int m_ActualNumThreads
protected transient ExecutorService m_Executor
public String globalInfo()
globalInfo
in class AbstractEvaluator
protected Evaluator getDefaultEvaluator()
getDefaultEvaluator
in class AbstractMetaEvaluator
protected int getDefaultLowerRuns()
public void setLowerRuns(int value)
value
- the number of runspublic int getLowerRuns()
public String lowerRunsTipText()
protected int getDefaultUpperRuns()
public void setUpperRuns(int value)
value
- the number of runspublic int getUpperRuns()
public String upperRunsTipText()
protected int getDefaultNumThreads()
public void setNumThreads(int value)
setNumThreads
in interface ThreadLimiter
value
- the number of threads: -1 = # of CPUs/cores; 0/1 = sequential executionpublic int getNumThreads()
getNumThreads
in interface ThreadLimiter
public String numThreadsTipText()
public Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class AbstractMetaEvaluator
public void setOptions(String[] options) throws Exception
setOptions
in interface weka.core.OptionHandler
setOptions
in class AbstractMetaEvaluator
options
- the options to parseException
- if parsing failspublic String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class AbstractMetaEvaluator
protected List<EvaluationStatistics> evaluateSequential(MultiLabelClassifier classifier, weka.core.Instances dataset)
classifier
- the classifier to evaluatedataset
- the dataset to evaluate onprotected List<EvaluationStatistics> evaluateParallel(MultiLabelClassifier classifier, weka.core.Instances dataset)
classifier
- the classifier to evaluatedataset
- the dataset to evaluate onpublic List<EvaluationStatistics> evaluate(MultiLabelClassifier classifier, weka.core.Instances dataset)
public void stop()
stop
in interface Evaluator
stop
in class AbstractMetaEvaluator
Copyright © 2017. All Rights Reserved.