From: <jen...@us...> - 2009-06-16 06:24:01
|
Revision: 1800 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1800&view=rev Author: jenslehmann Date: 2009-06-16 06:23:58 +0000 (Tue, 16 Jun 2009) Log Message: ----------- extended eval script Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java trunk/src/dl-learner/org/dllearner/utilities/statistics/Stat.java Modified: trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java 2009-06-15 13:22:29 UTC (rev 1799) +++ trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java 2009-06-16 06:23:58 UTC (rev 1800) @@ -43,6 +43,7 @@ import org.dllearner.core.configurators.CELOEConfigurator; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.Thing; import org.dllearner.kb.OWLFile; import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.learningproblems.EvaluatedDescriptionClass; @@ -189,11 +190,11 @@ } else { accStatSC.addNumber(bestAcc); } - if (bestAcc < minAccuracy) { + if (bestAcc < minAccuracy || (best.getDescription() instanceof Thing)) { System.out .println("The algorithm did not find a suggestion with an accuracy above the threshold of " + (100 * minAccuracy) - + "%. (The best one was \"" + + "% or the best description is not appropriate. (The best one was \"" + best.getDescription().toManchesterSyntaxString(baseURI, prefixes) + "\" with an accuracy of " @@ -347,6 +348,8 @@ System.out.println("axioms learned succesfully: " + foundDescriptionCount); System.out.println("axioms missed: " + missesCount); System.out.println("class with no sensible axioms: " + noSensibleDescriptionCount); + System.out.println("inconsistencies detected: " + inconsistencyDetected); + System.out.println("additional instances found: " + moreInstancesCountStat.prettyPrint("")); System.out.println("average accuracy overall: " + accStat.prettyPrint("")); System.out.println("average accuracy of selected expressions: " + accSelectedStat.prettyPrint("")); @@ -362,6 +365,8 @@ System.out.println("axioms learned succesfully: " + foundDescriptionCountSC); System.out.println("axioms missed: " + missesCountSC); System.out.println("class with no sensible axioms: " + noSensibleDescriptionCountSC); + System.out.println("inconsistencies detected: " + inconsistencyDetectedSC); + System.out.println("additional instances found: " + moreInstancesCountStatSC.prettyPrint("")); System.out.println("average accuracy overall: " + accStatSC.prettyPrint("")); System.out.println("average accuracy of selected expressions: " + accSelectedStatSC.prettyPrint("")); Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-06-15 13:22:29 UTC (rev 1799) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-06-16 06:23:58 UTC (rev 1800) @@ -86,11 +86,11 @@ } public EvaluatedDescription getBest() { - return set.last(); + return set.size()==0 ? null : set.last(); } public EvaluatedDescription getWorst() { - return set.first(); + return set.size()==0 ? null : set.first(); } /** Modified: trunk/src/dl-learner/org/dllearner/utilities/statistics/Stat.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/statistics/Stat.java 2009-06-15 13:22:29 UTC (rev 1799) +++ trunk/src/dl-learner/org/dllearner/utilities/statistics/Stat.java 2009-06-16 06:23:58 UTC (rev 1800) @@ -133,7 +133,8 @@ String str = "av. " + df.format(getMean()) + unit; str += " (deviation " + df.format(getStandardDeviation()) + unit + "; "; str += "min " + df.format(getMin()) + unit + "; "; - str += "max " + df.format(getMax()) + unit + ")"; + str += "max " + df.format(getMax()) + unit + "; "; + str += "count " + count + ")"; return str; } else { return "no data collected"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |