|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.weka.evaluator.AbstractInstanceEvaluator
adams.data.weka.evaluator.AbstractDatasetInstanceEvaluator
adams.data.weka.evaluator.AbstractCrossvalidatedInstanceEvaluator<T>
T - the type of containerpublic abstract class AbstractCrossvalidatedInstanceEvaluator<T extends AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer>
Ancestor for evalutors that use cross-validation for initialization.
| Nested Class Summary | |
|---|---|
static class |
AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer
Container for storing the evaluation results. |
| Field Summary | |
|---|---|
protected int |
m_Folds
the number of folds for cross-validation. |
protected int |
m_Seed
the random seed for cross-valiation. |
| Fields inherited from class adams.data.weka.evaluator.AbstractDatasetInstanceEvaluator |
|---|
m_Data, m_Threshold |
| Fields inherited from class adams.data.weka.evaluator.AbstractInstanceEvaluator |
|---|
m_Initialized |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
AbstractCrossvalidatedInstanceEvaluator()
|
|
| Method Summary | |
|---|---|
void |
defineOptions()
Adds options to the internal list of options. |
protected abstract Vector<T> |
evaluate(weka.core.Instances train,
weka.core.Instances test)
Performs an evaluation on the given train and test set. |
protected String |
findThreshold()
Finds the user-defined threshold and sets other internal variables accordingly. |
protected abstract String |
findThreshold(Vector<T> evals)
Finds the threshold based on the collected data. |
String |
foldsTipText()
Returns the tip text for this property. |
int |
getFolds()
Returns the number of folds for cross-validation. |
int |
getSeed()
Returns the seed value for cross-validation. |
String |
seedTipText()
Returns the tip text for this property. |
void |
setFolds(int value)
Sets the number of folds for cross-validation. |
void |
setSeed(int value)
Sets the seed value for cross-validation. |
| Methods inherited from class adams.data.weka.evaluator.AbstractDatasetInstanceEvaluator |
|---|
cleanUp, getData, getThreshold, reset, setData, setThreshold, setUp, split, thresholdTipText |
| Methods inherited from class adams.data.weka.evaluator.AbstractInstanceEvaluator |
|---|
check, compareTo, destroy, doEvaluate, equals, evaluate, forCommandLine, forName, getEvaluators, shallowCopy, shallowCopy |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, globalInfo, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int m_Folds
protected int m_Seed
| Constructor Detail |
|---|
public AbstractCrossvalidatedInstanceEvaluator()
| Method Detail |
|---|
public void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractDatasetInstanceEvaluatorpublic void setFolds(int value)
value - the number of folds (<2 turns off cross-validation)public int getFolds()
public String foldsTipText()
public void setSeed(int value)
value - the seedpublic int getSeed()
public String seedTipText()
protected abstract String findThreshold(Vector<T> evals)
evals - the collected evaluation containers
protected abstract Vector<T> evaluate(weka.core.Instances train,
weka.core.Instances test)
train - the training settest - the test set
protected String findThreshold()
findThreshold in class AbstractDatasetInstanceEvaluator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||