From: <ji...@us...> - 2011-06-09 17:06:02
|
Revision: 2859 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2859&view=rev Author: jialva Date: 2011-06-09 17:05:56 +0000 (Thu, 09 Jun 2011) Log Message: ----------- New update of fuzzyDL-Learner Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-06-09 16:12:18 UTC (rev 2858) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-06-09 17:05:56 UTC (rev 2859) @@ -209,7 +209,7 @@ // TODO remove, just for testing purposes FileWriter fstream; try { - fstream = new FileWriter("../examples/fuzzydll/testOut_TriRecEq.log"); + fstream = new FileWriter("../examples/fuzzydll/testOut_v2.0_noise30_10000.log"); out = new PrintWriter(fstream); } catch (IOException e) { // TODO Auto-generated catch block @@ -397,11 +397,11 @@ // TODO just for testing purposes counter++; - System.out.println(counter + " next node: " + nextNode); + out.println(counter + " next node: " + nextNode); for(Description refinement : refinements) { - System.out.println("refinement: " + refinement); + out.println("refinement: " + refinement); } - System.out.println(); + out.println(); while(refinements.size() != 0) { // pick element from set @@ -471,12 +471,19 @@ } private FuzzyOENode getNextNodeToExpand() { + // TODO: remove, just for testing purposes +// Iterator<FuzzyOENode> itx = nodes.descendingIterator(); +// while(itx.hasNext()) { +// FuzzyOENode node = itx.next(); +// out.println(node.getAccuracy() + " " + node.getHorizontalExpansion() + " " + node.getDescription().getLength() + " " + node); +// } // we expand the best node of those, which have not achieved 100% accuracy // already and have a horizontal expansion equal to their length // (rationale: further extension is likely to add irrelevant syntactical constructs) Iterator<FuzzyOENode> it = nodes.descendingIterator(); while(it.hasNext()) { FuzzyOENode node = it.next(); + // TODO: in a fuzzy environment ... has sense to return nodes with accuracy < 1 ??? if(node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength()) { return node; } Modified: trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java 2011-06-09 16:12:18 UTC (rev 2858) +++ trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java 2011-06-09 17:05:56 UTC (rev 2859) @@ -43,6 +43,21 @@ */ public class FuzzyDLLTest_Trains { + String[] posEx = { + "http://www.example.com/fuzzyTrains.owl#east1", + "http://www.example.com/fuzzyTrains.owl#east2", + "http://www.example.com/fuzzyTrains.owl#east3", + "http://www.example.com/fuzzyTrains.owl#east4", + "http://www.example.com/fuzzyTrains.owl#east5" + }; + String[] negEx = { + "http://www.example.com/fuzzyTrains.owl#west6", + "http://www.example.com/fuzzyTrains.owl#west7", + "http://www.example.com/fuzzyTrains.owl#west8", + "http://www.example.com/fuzzyTrains.owl#west9", + "http://www.example.com/fuzzyTrains.owl#west0" + }; + // String[] posEx = { // "http://www.example.com/fuzzyTrains.owl#east1", // "http://www.example.com/fuzzyTrains.owl#east2" @@ -52,12 +67,12 @@ // "http://www.example.com/fuzzyTrains.owl#west7" // }; - String[] posEx = { - "http://www.example.com/fuzzyTrains.owl#carPositive" - }; - String[] negEx = { - "http://www.example.com/fuzzyTrains.owl#carNegative" - }; +// String[] posEx = { +// "http://www.example.com/fuzzyTrains.owl#carPositive" +// }; +// String[] negEx = { +// "http://www.example.com/fuzzyTrains.owl#carNegative" +// }; public Description learn() throws LearningProblemUnsupportedException, IOException, ComponentInitException { @@ -87,7 +102,7 @@ ComponentManager cm = ComponentManager.getInstance(); OWLFile ks = cm.knowledgeSource(OWLFile.class); - ks.getConfigurator().setUrl(new URL("file", null, "../examples/fuzzydll/fuzzyTrains_simplestExample_fuzzyLoad.owl")); + ks.getConfigurator().setUrl(new URL("file", null, "../examples/fuzzydll/fuzzyTrains_v2.0.owl")); ks.init(); // ReasonerComponent rc = cm.reasoner(OWLAPIReasoner.class, ks); @@ -111,13 +126,13 @@ // Set<String> aaaaaaaaaa = new TreeSet<String>(); // aaaaaaaaaa.add("Nothing"); // fc.getConfigurator().setIgnoredConcepts(aaaaaaaaaa); - fc.getConfigurator().setMaxClassDescriptionTests(1000); + fc.getConfigurator().setMaxClassDescriptionTests(10000); fc.getConfigurator().setMaxExecutionTimeInSeconds(0); fc.getConfigurator().setUseDoubleDatatypes(false); fc.getConfigurator().setUseCardinalityRestrictions(false); fc.getConfigurator().setWriteSearchTree(true); fc.getConfigurator().setSearchTreeFile("log/searchTreeFuzzy.txt"); - fc.getConfigurator().setNoisePercentage(100); + fc.getConfigurator().setNoisePercentage(30); fc.init(); fc.start(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |