public class CrossValidation extends AbstractEvaluator implements weka.core.Randomizable, ThreadLimiter
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_FOLD
the key for the fold.
|
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_NumFolds
the number of folds.
|
protected int |
m_NumThreads
the number of threads to use for parallel execution.
|
protected boolean |
m_PreserveOrder
whether to preserve the order.
|
protected int |
m_Seed
the seed value.
|
protected String |
m_Threshold
the threshold option.
|
protected String |
m_Verbosity
the verbosity option.
|
m_Stoppedm_Debug, m_LogListeners| Constructor and Description |
|---|
CrossValidation() |
| 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)
Returns the evaluation statistics generated for the dataset (parallel execution).
|
protected List<EvaluationStatistics> |
evaluateSequential(MultiLabelClassifier classifier,
weka.core.Instances dataset)
Returns the evaluation statistics generated for the dataset (sequential execution).
|
protected int |
getDefaultNumFolds()
Gets the number of folds.
|
protected int |
getDefaultNumThreads()
Returns the default number of threads to use.
|
protected int |
getDefaultSeed()
Gets the default seed for the random number generations
|
protected String |
getDefaultThreshold()
Gets the default threshold option.
|
protected String |
getDefaultVerbosity()
Gets the default threshold option.
|
int |
getNumFolds()
Gets the number of folds
|
int |
getNumThreads()
Returns the number of threads to use.
|
String[] |
getOptions()
Returns the options.
|
boolean |
getPreserveOrder()
Returns whether to preserve the order instead of randomizing the data.
|
int |
getSeed()
Gets the seed for the random number generations
|
String |
getThreshold()
Gets the threshold option.
|
String |
getVerbosity()
Gets the verbosity option.
|
String |
globalInfo()
Description to be displayed in the GUI.
|
Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration of all the available options..
|
String |
numFoldsTipText()
Describes this property.
|
String |
numThreadsTipText()
Returns the tip text for this property.
|
String |
preserveOrderTipText()
Describes this property.
|
String |
seedTipText()
Describes this property.
|
void |
setNumFolds(int value)
Set the number of folds.
|
void |
setNumThreads(int value)
Sets the number of threads to use.
|
void |
setOptions(String[] options)
Sets the options.
|
void |
setPreserveOrder(boolean value)
Sets whether to preserve the order instead of randomizing the data.
|
void |
setSeed(int value)
Set the seed for random number generation.
|
void |
setThreshold(String value)
Set the threshold option.
|
void |
setVerbosity(String value)
Set the verbosity option.
|
void |
stop()
Stops the evaluation, if possible.
|
String |
thresholdTipText()
Describes this property.
|
String |
verbosityTipText()
Describes this property.
|
initializeaddLogListener, debug, getLogListeners, handleException, log, removeLogListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLogListener, log, removeLogListenerpublic static final String KEY_FOLD
protected int m_NumFolds
protected boolean m_PreserveOrder
protected int m_Seed
protected int m_NumThreads
protected int m_ActualNumThreads
protected transient ExecutorService m_Executor
protected String m_Threshold
protected String m_Verbosity
public String globalInfo()
globalInfo in class AbstractEvaluatorprotected int getDefaultNumFolds()
public void setNumFolds(int value)
value - the folds (>= 2)public int getNumFolds()
public String numFoldsTipText()
public void setPreserveOrder(boolean value)
value - true if to preserve the orderpublic boolean getPreserveOrder()
public String preserveOrderTipText()
protected int getDefaultSeed()
public void setSeed(int value)
setSeed in interface weka.core.Randomizablevalue - the seedpublic int getSeed()
getSeed in interface weka.core.Randomizablepublic String seedTipText()
protected int getDefaultNumThreads()
public void setNumThreads(int value)
setNumThreads in interface ThreadLimitervalue - the number of threads: -1 = # of CPUs/cores; 0/1 = sequential executionpublic int getNumThreads()
getNumThreads in interface ThreadLimiterpublic String numThreadsTipText()
protected String getDefaultThreshold()
public void setThreshold(String value)
value - the optionpublic String getThreshold()
public String thresholdTipText()
protected String getDefaultVerbosity()
public void setVerbosity(String value)
value - the optionpublic String getVerbosity()
public String verbosityTipText()
public Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class AbstractEvaluatorpublic void setOptions(String[] options) throws Exception
setOptions in interface weka.core.OptionHandlersetOptions in class AbstractEvaluatoroptions - the options to parseException - if parsing failspublic String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class AbstractEvaluatorprotected 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 Evaluatorstop in class AbstractEvaluatorCopyright © 2017. All Rights Reserved.