jcolibri.extensions.maintenance_evaluation.evaluators
Class MaintenanceSameSplitEvaluator
java.lang.Object
jcolibri.evaluation.Evaluator
jcolibri.extensions.maintenance_evaluation.MaintenanceEvaluator
jcolibri.extensions.maintenance_evaluation.evaluators.MaintenanceSameSplitEvaluator
public class MaintenanceSameSplitEvaluator
- extends MaintenanceEvaluator
This evaluation 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.
It uses queries from a file so that the evaluation can be repeated with the
same test/training set split.
The generateSplit() method does the initial random split and saves the query set in a file.
Later, the HoldOutfromFile() method uses that file to load the query set and
perform the evaluation.
- Author:
- Juan A. Recio García & Lisa Cummins
Method Summary |
void |
HoldOutfromFile(java.lang.String file)
Perform HoldOut evaluation using the queries contained in the specified file. |
protected void |
prepareCases(java.util.Collection<CBRCase> originalCases,
java.util.List<CBRCase> querySet,
java.lang.String file,
CBRCaseBase caseBase)
Prepares the cases for evaluation by setting up test and training sets |
static void |
splitCaseBaseFromFile(java.util.Collection<CBRCase> wholeCaseBase,
java.util.List<CBRCase> querySet,
java.util.List<CBRCase> casebaseSet,
java.lang.String filename)
Splits the case base in two sets: queries and case base, with the
queries contained in the given file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MaintenanceSameSplitEvaluator
public MaintenanceSameSplitEvaluator()
HoldOutfromFile
public void HoldOutfromFile(java.lang.String file)
- Perform HoldOut evaluation using the queries contained in the specified file.
- Parameters:
file
- the file containing the queries.
prepareCases
protected void prepareCases(java.util.Collection<CBRCase> originalCases,
java.util.List<CBRCase> querySet,
java.lang.String file,
CBRCaseBase caseBase)
- Prepares the cases for evaluation by setting up test and training sets
- Parameters:
originalCases
- Complete original set of casesquerySet
- Where queries are to be storedcaseBase
- The case base
splitCaseBaseFromFile
public static void splitCaseBaseFromFile(java.util.Collection<CBRCase> wholeCaseBase,
java.util.List<CBRCase> querySet,
java.util.List<CBRCase> casebaseSet,
java.lang.String filename)
- Splits the case base in two sets: queries and case base, with the
queries contained in the given file
- Parameters:
wholeCaseBase
- Complete original case basequerySet
- Output param where queries are storedcasebaseSet
- Output param where case base is storedfilename
- File which contains the queries