From: <lor...@us...> - 2011-09-02 07:22:33
|
Revision: 3219 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3219&view=rev Author: lorenz_b Date: 2011-09-02 07:22:27 +0000 (Fri, 02 Sep 2011) Log Message: ----------- Improved enrichment output for CELOE. Modified Paths: -------------- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-09-02 06:51:19 UTC (rev 3218) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-09-02 07:22:27 UTC (rev 3219) @@ -389,13 +389,13 @@ la.setMaxExecutionTimeInSeconds(10); la.setNoisePercentage(25); la.init(); - System.out.print("running CELOE ... "); + System.out.print("running CELOE (for " + (equivalence ? "EquivalentClasses" : "SubClasses)") + "... "); la.start(); System.out.println("done"); // convert the result to axioms (to make it compatible with the other algorithms) List<? extends EvaluatedDescription> learnedDescriptions = la.getCurrentlyBestEvaluatedDescriptions(threshold); - List<EvaluatedAxiom> evaluatedAxioms = new LinkedList<EvaluatedAxiom>(); + List<EvaluatedAxiom> learnedAxioms = new LinkedList<EvaluatedAxiom>(); for(EvaluatedDescription learnedDescription : learnedDescriptions) { Axiom axiom; if(equivalence) { @@ -404,11 +404,12 @@ axiom = new SubClassAxiom(nc, learnedDescription.getDescription()); } Score score = lp.computeScore(learnedDescription.getDescription()); - evaluatedAxioms.add(new EvaluatedAxiom(axiom, score)); + learnedAxioms.add(new EvaluatedAxiom(axiom, score)); } + System.out.println(prettyPrint(learnedAxioms)); - algorithmRuns.add(new AlgorithmRun(CELOE.class, evaluatedAxioms, ConfigHelper.getConfigOptionValuesString(la))); - return evaluatedAxioms; + algorithmRuns.add(new AlgorithmRun(CELOE.class, learnedAxioms, ConfigHelper.getConfigOptionValuesString(la))); + return learnedAxioms; } private List<EvaluatedAxiom> applyLearningAlgorithm(Class<? extends AxiomLearningAlgorithm> algorithmClass, SparqlEndpointKS ks, Entity entity) throws ComponentInitException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |