private void updateLearningProblem(EvaluatedDescription<? extends Score> partialSolution) { // get individuals covered by the solution SortedSet<OWLIndividual> coveredExamples = la.getReasoner().getIndividuals(partialSolution.getDescription()); // remove from pos examples as those are already covered currentPosExamples.removeAll(coveredExamples); // remove from neg examples as those will always be covered in the combined solution currentNegExamples.removeAll(coveredExamples); // update the learning problem itself // TODO do we need some re-init of the lp afterwards? if(lp instanceof PosNegLP) { ((PosNegLP) la.getLearningProblem()).setPositiveExamples(currentPosExamples); ((PosNegLP) la.getLearningProblem()).setNegativeExamples(currentNegExamples); } else if(lp instanceof PosOnlyLP) { ((PosOnlyLP) la.getLearningProblem()).setPositiveExamples(currentPosExamples); } else if(lp instanceof ClassLearningProblem){ // TODO } }
cela.getReasoner().releaseKB(); celaTimeMills = System.currentTimeMillis() - celaTimeMills;