From: <jen...@us...> - 2010-02-18 11:16:21
|
Revision: 2063 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2063&view=rev Author: jenslehmann Date: 2010-02-18 11:16:14 +0000 (Thu, 18 Feb 2010) Log Message: ----------- fixed bug which caused problems when loading CELOE conf files in GUI Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java trunk/src/dl-learner/org/dllearner/gui/Config.java trunk/src/dl-learner/org/dllearner/gui/RunPanel.java trunk/src/dl-learner/org/dllearner/gui/StatisticsThread.java trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2010-02-18 10:00:44 UTC (rev 2062) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2010-02-18 11:16:14 UTC (rev 2063) @@ -313,6 +313,8 @@ @Override public void start() { +// System.out.println(configurator.getMaxExecutionTimeInSeconds()); + stop = false; isRunning = true; reset(); @@ -367,6 +369,7 @@ // System.out.println("addNode finished" + " " + new Date()); } +// System.out.println(" refinement queue length: " + refinements.size()); } updateMinMaxHorizExp(nextNode); @@ -391,6 +394,7 @@ // System.out.println(startNode.toTreeString(baseURI)); isRunning = false; +// System.out.println("isRunning: " + isRunning); } private OENode getNextNodeToExpand() { @@ -429,7 +433,7 @@ // returns true if node was added and false otherwise private boolean addNode(Description description, OENode parentNode) { - System.out.println(description); +// System.out.println(description); // redundancy check (return if redundant) boolean nonRedundant = descriptions.add(description); @@ -446,7 +450,7 @@ // quality of description (return if too weak) double accuracy = learningProblem.getAccuracyOrTooWeak(description, noise); // issue a warning if accuracy is not between 0 and 1 or -1 (too weak) - if(accuracy > 1 || (accuracy < 0 || accuracy != -1)) { + if(accuracy > 1.0 || (accuracy < 0.0 && accuracy != -1)) { logger.warn("Invalid accuracy value " + accuracy + " for description " + description + ". This could be caused by a bug in the heuristic measure and should be reported to the DL-Learner bug tracker."); System.exit(0); } @@ -667,7 +671,7 @@ str += current + ": " + descriptionToString(ed.getDescription()) + " (pred. acc.: " + dfPercent.format(((PosNegLPStandard)learningProblem).getPredAccuracyOrTooWeakExact(ed.getDescription(),1)) + ", F-measure: "+ dfPercent.format(((PosNegLPStandard)learningProblem).getFMeasureOrTooWeakExact(ed.getDescription(),1)) + ")\n"; } else { str += current + ": " + descriptionToString(ed.getDescription()) + " " + dfPercent.format(ed.getAccuracy()) + "\n"; - System.out.println(ed); +// System.out.println(ed); } current++; } Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java 2010-02-18 10:00:44 UTC (rev 2062) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java 2010-02-18 11:16:14 UTC (rev 2063) @@ -188,8 +188,8 @@ // allowed/ignored concepts/roles could also be a reasoner option (?) options.add(CommonConfigOptions.allowedConcepts()); options.add(CommonConfigOptions.ignoredConcepts()); - options.add(CommonConfigOptions.allowedRoles()); - options.add(CommonConfigOptions.ignoredRoles()); +// options.add(CommonConfigOptions.allowedRoles()); +// options.add(CommonConfigOptions.ignoredRoles()); options.add(CommonConfigOptions.useAllConstructor()); options.add(CommonConfigOptions.useExistsConstructor()); options.add(CommonConfigOptions.useHasValueConstructor()); Modified: trunk/src/dl-learner/org/dllearner/gui/Config.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/Config.java 2010-02-18 10:00:44 UTC (rev 2062) +++ trunk/src/dl-learner/org/dllearner/gui/Config.java 2010-02-18 11:16:14 UTC (rev 2063) @@ -151,6 +151,7 @@ reasoner = start.getReasonerComponent(); // rs = start.getReasonerComponent(); lp = start.getLearningProblem(); +// System.out.println(lp); la = start.getLearningAlgorithm(); // all components initialised and enabled Modified: trunk/src/dl-learner/org/dllearner/gui/RunPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2010-02-18 10:00:44 UTC (rev 2062) +++ trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2010-02-18 11:16:14 UTC (rev 2063) @@ -322,12 +322,12 @@ private String makeTime(Long nanoSeconds) { if (nanoSeconds == null) return null; - Long hours = 0L, minutes = 0L, seconds = 0L, millis = 0L, mikros = 0L, nanos = 0L; + Long hours = 0L, minutes = 0L, seconds = 0L, millis = 0L; //, mikros = 0L, nanos = 0L; String timeStr = ""; - nanos = nanoSeconds % 1000; +// nanos = nanoSeconds % 1000; nanoSeconds /= 1000; - mikros = nanoSeconds % 1000; +// mikros = nanoSeconds % 1000; nanoSeconds /= 1000; millis = nanoSeconds % 1000; nanoSeconds /= 1000; @@ -345,10 +345,10 @@ timeStr += seconds + "s "; if (millis > 0) timeStr += millis + "ms "; - if (false) - timeStr += mikros + "�s "; - if (false) - timeStr += nanos + "ns "; +// if (false) +// timeStr += mikros + "�s "; +// if (false) +// timeStr += nanos + "ns "; return timeStr; } Modified: trunk/src/dl-learner/org/dllearner/gui/StatisticsThread.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/StatisticsThread.java 2010-02-18 10:00:44 UTC (rev 2062) +++ trunk/src/dl-learner/org/dllearner/gui/StatisticsThread.java 2010-02-18 11:16:14 UTC (rev 2063) @@ -52,8 +52,11 @@ sleep(2000); } // show final stats +// System.out.println("terminated"); +// System.exit(0); runPanel.showStats(); runPanel.algorithmTerminated(); + } catch (InterruptedException e) { e.printStackTrace(); } Modified: trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java 2010-02-18 10:00:44 UTC (rev 2062) +++ trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java 2010-02-18 11:16:14 UTC (rev 2063) @@ -125,7 +125,8 @@ // get current value of this option for the given component value = config.getConfigOptionValue(component, configOption); - +// System.out.println(configOption + " " + value); + // if the option value is an OWL class, we offer a dropdown box if(((URLConfigOption) configOption).refersToOWLClass()) { comboBox = new JComboBox(); @@ -137,7 +138,10 @@ comboBox.addItem(clazz.toManchesterSyntaxString(baseURI, prefixes)); } comboBox.addActionListener(this); - comboBox.setSelectedIndex(0); + // selecting index 0 causes incorrect class to load ! +// comboBox.setSelectedIndex(0); + NamedClass valueNc = new NamedClass(value.toString()); + comboBox.setSelectedItem(valueNc.toManchesterSyntaxString(baseURI, prefixes)); add(comboBox); } else { // text field for strings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |