jcolibri.evaluation.evaluators
Class HoldOutEvaluator

java.lang.Object
  extended by jcolibri.evaluation.Evaluator
      extended by 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

Field Summary
protected  StandardCBRApplication app
           
 
Fields inherited from class jcolibri.evaluation.Evaluator
report
 
Constructor Summary
HoldOutEvaluator()
           
 
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 jcolibri.evaluation.Evaluator
getEvaluationReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

app

protected StandardCBRApplication app
Constructor Detail

HoldOutEvaluator

public HoldOutEvaluator()
Method Detail

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 base
querySet - Output param where queries are stored
casebaseSet - Output param where case base is stored
testPercent - Percentage of cases used as queries

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es