Example #1
0
 protected String computeHSShortLog(
     TreeSearch<FormulaSet<OWLLogicalAxiom>, OWLLogicalAxiom> search,
     OWLTheory theory,
     FormulaSet<OWLLogicalAxiom> diagnoses,
     List<Double> queries,
     QSSType type,
     String message,
     OWLTheory queryAnswerTheory) {
   SimulatedSession session = new SimulatedSession();
   session.setShowElRates(false);
   TableList entry = new TableList();
   session.setEntry(entry);
   session.setMessage(message);
   session.setTargetD(diagnoses);
   session.setScoringFunct(type);
   session.setTheory(theory);
   session.setQueryAnswerTheory(queryAnswerTheory);
   session.setSearch(search);
   String out = session.simulateQuerySession();
   FormulaSet<OWLLogicalAxiom> diag = getMostProbable(search.getDiagnoses());
   logger.info("found Diag: " + CalculateDiagnoses.renderAxioms(diag));
   boolean foundCorrectD =
       diagnoses.containsAll(
           diag); // with ConflictTreeTest only a subset of the diagnosis could be returned
   if (this.getClass() != ConflictTreeTest.class) {
     foundCorrectD = diag.equals(diagnoses);
     theory.getKnowledgeBase().clearTestCases(); // don't clear if called from ConflictTreeTest
   }
   search.reset();
   // Assert.assertTrue(foundCorrectD);
   queries.add(entry.getMeanQuery());
   return out;
 }