From: <far...@us...> - 2014-02-17 23:35:27
|
Revision: 4230 http://sourceforge.net/p/dl-learner/code/4230 Author: farshadbadie Date: 2014-02-17 23:35:23 +0000 (Mon, 17 Feb 2014) Log Message: ----------- FuzzyCELOE extension test Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java trunk/interfaces/pom.xml trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java trunk/pom.xml Added Paths: ----------- trunk/test/fuzzydll/FuzzyDL.jar trunk/test/fuzzydll/fuzzy_trains.conf trunk/test/fuzzydll/gurobi-5.0.1.jar 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 2014-02-17 15:51:37 UTC (rev 4229) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2014-02-17 23:35:23 UTC (rev 4230) @@ -26,6 +26,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.NoSuchElementException; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -448,6 +449,8 @@ // chose best node according to heuristics nextNode = getNextNodeToExpand(); + if(nextNode == null) + break; int horizExp = nextNode.getHorizontalExpansion(); // apply operator @@ -561,7 +564,15 @@ // this should practically never be called, since for any reasonable learning // task, we will always have at least one node with less than 100% accuracy - return nodes.last(); + // *** patch start *** + FuzzyOENode last; + try { + last = nodes.last(); + } catch (NoSuchElementException e) { + return null; + } + return last; + // *** patch end *** } // expand node horizontically Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2014-02-17 15:51:37 UTC (rev 4229) +++ trunk/interfaces/pom.xml 2014-02-17 23:35:23 UTC (rev 4230) @@ -606,6 +606,10 @@ <version>2.8.0</version> </dependency> + <dependency> + <groupId>gurobi</groupId> + <artifactId>gurobi</artifactId> + </dependency> </dependencies> Modified: trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java 2014-02-17 15:51:37 UTC (rev 4229) +++ trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java 2014-02-17 23:35:23 UTC (rev 4230) @@ -215,7 +215,7 @@ // Get the Root Error Message logger.error("An Error Has Occurred During Processing."); - logger.error(primaryCause.getMessage()); +// logger.error(primaryCause.getMessage()); logger.debug("Stack Trace: ", e); logger.error("Terminating DL-Learner...and writing stacktrace to: " + stacktraceFileName); FileOutputStream fos = new FileOutputStream(stacktraceFileName); Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2014-02-17 15:51:37 UTC (rev 4229) +++ trunk/pom.xml 2014-02-17 23:35:23 UTC (rev 4230) @@ -508,8 +508,13 @@ <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> - - </dependencies> + + <dependency> + <groupId>gurobi</groupId> + <artifactId>gurobi</artifactId> + <version>5.0.1</version> + </dependency> + </dependencies> </dependencyManagement> <repositories> Added: trunk/test/fuzzydll/FuzzyDL.jar =================================================================== (Binary files differ) Index: trunk/test/fuzzydll/FuzzyDL.jar =================================================================== --- trunk/test/fuzzydll/FuzzyDL.jar 2014-02-17 15:51:37 UTC (rev 4229) +++ trunk/test/fuzzydll/FuzzyDL.jar 2014-02-17 23:35:23 UTC (rev 4230) Property changes on: trunk/test/fuzzydll/FuzzyDL.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/test/fuzzydll/fuzzy_trains.conf =================================================================== --- trunk/test/fuzzydll/fuzzy_trains.conf (rev 0) +++ trunk/test/fuzzydll/fuzzy_trains.conf 2014-02-17 23:35:23 UTC (rev 4230) @@ -0,0 +1,22 @@ + +// declare some prefixes to use as abbreviations +prefixes = [ ("ex","http://www.example.com/fuzzyTrains.owl#") ] + +// knowledge source definition +ks.type = "OWL File" +ks.fileName = "fuzzyTrains_v5.0.owl" + +// reasoner +reasoner.type = "Fuzzy OWL API Reasoner" +reasoner.sources = { ks } + +// learning problem +problem.type = "fuzzyPosNeg" +problem.positiveExamples = { } +problem.negativeExamples = { } +problem.fuzzyEx = [("ex:east1",0.7),("ex:east2",0.5),("ex:west8",0.3),("ex:west9",0.1)] +problem.reasoner = reasoner + +// algorithm +algorithm.type = "Fuzzy CELOE" +algorithm.reasoner = reasoner \ No newline at end of file Added: trunk/test/fuzzydll/gurobi-5.0.1.jar =================================================================== (Binary files differ) Index: trunk/test/fuzzydll/gurobi-5.0.1.jar =================================================================== --- trunk/test/fuzzydll/gurobi-5.0.1.jar 2014-02-17 15:51:37 UTC (rev 4229) +++ trunk/test/fuzzydll/gurobi-5.0.1.jar 2014-02-17 23:35:23 UTC (rev 4230) Property changes on: trunk/test/fuzzydll/gurobi-5.0.1.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |