jcolibri.evaluation.evaluators
Class HoldOutEvaluator
java.lang.Object
jcolibri.evaluation.Evaluator
jcolibri.evaluation.evaluators.HoldOutEvaluator
public class HoldOutEvaluator
- extends Evaluator
This method splits the case base in two sets: one used for testing where each
case is used as query, and another that acts as normal case base. This
process is performed serveral times.
- Version:
- 2.0
- Author:
- Juan A. Recio García - GAIA http://gaia.fdi.ucm.es
Method Summary |
void |
HoldOut(int testPercent,
int repetitions)
Performs the Hold-Out evaluation. |
void |
init(StandardCBRApplication cbrApp)
Initializes the evaluator with the CBR application to evaluate |
protected void |
splitCaseBase(java.util.Collection<CBRCase> holeCaseBase,
java.util.List<CBRCase> querySet,
java.util.List<CBRCase> casebaseSet,
int testPercent)
Splits the case base in two sets: queries and case base |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
app
protected StandardCBRApplication app
HoldOutEvaluator
public HoldOutEvaluator()
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
HoldOut
public void HoldOut(int testPercent,
int repetitions)
- Performs the Hold-Out evaluation.
- Parameters:
testPercent
- Percent of the case base used as queries. The case base is splited randomly in each repetition.repetitions
- Number of repetitions.
splitCaseBase
protected void splitCaseBase(java.util.Collection<CBRCase> holeCaseBase,
java.util.List<CBRCase> querySet,
java.util.List<CBRCase> casebaseSet,
int testPercent)
- Splits the case base in two sets: queries and case base
- Parameters:
holeCaseBase
- Complete original case basequerySet
- Output param where queries are storedcasebaseSet
- Output param where case base is storedtestPercent
- Percentage of cases used as queries