jcolibri.evaluation.evaluators
Class NFoldEvaluator
java.lang.Object
jcolibri.evaluation.Evaluator
jcolibri.evaluation.evaluators.NFoldEvaluator
public class NFoldEvaluator
- extends Evaluator
This evaluation method divides the case base into several random folds (indicated by the user).
For each fold, their cases are used as queries and the remaining folds are used together as case base.
This process is performed several times.
- Version:
- 2.0
- Author:
- Juan A. Recio García - GAIA http://gaia.fdi.ucm.es
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
app
protected StandardCBRApplication app
_folds
protected java.util.ArrayList<java.util.ArrayList<CBRCase>> _folds
NFoldEvaluator
public NFoldEvaluator()
init
public void init(StandardCBRApplication cbrApp)
- Description copied from class:
Evaluator
- Initializes the evaluator with the CBR application to evaluate
- Specified by:
init
in class Evaluator
- See Also:
StandardCBRApplication
NFoldEvaluation
public void NFoldEvaluation(int folds,
int repetitions)
- Executes the N-Fold evaluation.
- Parameters:
folds
- Number of folds (randomly generated).repetitions
- Number of repetitions
createFolds
protected void createFolds(java.util.Collection<CBRCase> cases,
int folds)
getFolds
protected void getFolds(int f,
java.util.List<CBRCase> querySet,
java.util.List<CBRCase> caseBaseSet)