From: <jen...@us...> - 2010-07-13 16:58:31
|
Revision: 2195 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2195&view=rev Author: jenslehmann Date: 2010-07-13 16:58:22 +0000 (Tue, 13 Jul 2010) Log Message: ----------- evaluation mode for testing parameter combinations Modified Paths: -------------- trunk/examples/mutagenesis/train1.conf trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java Modified: trunk/examples/mutagenesis/train1.conf =================================================================== --- trunk/examples/mutagenesis/train1.conf 2010-07-09 20:00:32 UTC (rev 2194) +++ trunk/examples/mutagenesis/train1.conf 2010-07-13 16:58:22 UTC (rev 2195) @@ -1,8 +1,8 @@ import("mutagenesis.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 31; +algorithm = celoe; +refexamples.noisePercentage = 11; refexamples.startClass = "http://dl-learner.org/mutagenesis#Compound"; refexamples.writeSearchTree = false; refexamples.searchTreeFile = "log/mutagenesis/searchTree.log"; Modified: trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java 2010-07-09 20:00:32 UTC (rev 2194) +++ trunk/src/dl-learner/org/dllearner/scripts/evaluation/OntologyEngineering.java 2010-07-13 16:58:22 UTC (rev 2195) @@ -79,9 +79,12 @@ // for performance measurements and development private static boolean autoMode = true; - private static boolean useFastInstanceChecker = true; - private static boolean useApproximations = true; + // if set to true, this overrides the two options below and tests all four combinations => doesn't seem to work + private static boolean testFCIApprox = false; + private static boolean useFastInstanceChecker = false; + private static boolean useApproximations = false; private static boolean computeApproxDiff = true; + private static boolean useFMeasure = false; @SuppressWarnings("unchecked") public static void main(String[] args) throws ComponentInitException, @@ -93,9 +96,9 @@ if (args.length == 0) { System.out.println("You need to give an OWL file as argument."); System.exit(0); - } - + } + ComponentManager cm = ComponentManager.getInstance(); // load OWL in reasoner @@ -115,7 +118,28 @@ } reasoner.init(); System.out.println("Loaded ontology " + args[0] + "."); - + + if(testFCIApprox) { + useFastInstanceChecker = false; + useApproximations = false; + run(reasoner); + useFastInstanceChecker = false; + useApproximations = true; + run(reasoner); + useFastInstanceChecker = true; + useApproximations = false; + run(reasoner); + useFastInstanceChecker = true; + useApproximations = true; + run(reasoner); + } else { + run(reasoner); + } + } + + public static void run(ReasonerComponent reasoner) throws ComponentInitException, IOException, LearningProblemUnsupportedException { + ComponentManager cm = ComponentManager.getInstance(); + String baseURI = reasoner.getBaseURI(); Map<String, String> prefixes = reasoner.getPrefixes(); @@ -191,6 +215,9 @@ lp.getConfigurator().setType("superClass"); } lp.getConfigurator().setUseApproximations(useApproximations); + if(useFMeasure) { + lp.getConfigurator().setAccuracyMethod("fmeasure"); + } lp.init(); CELOE celoe = cm.learningAlgorithm(CELOE.class, lp, reasoner); @@ -380,7 +407,7 @@ System.out .println("knowledge engineering process finished successfully - summary shown below"); System.out.println(); - System.out.println("ontology: " + args[0]); +// System.out.println("ontology: " + args[0]); System.out.println("settings: " + minAccuracy + " min accuracy, " + minInstanceCount + " min instances, " + algorithmRuntimeInSeconds + "s algorithm runtime"); System.out.println("user input protocol: " + userInputProtocol); System.out.println("classes in ontology: " + classes.size()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |