From: <ku...@us...> - 2008-09-09 11:38:50
|
Revision: 1184 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1184&view=rev Author: kurzum Date: 2008-09-09 11:38:48 +0000 (Tue, 09 Sep 2008) Log Message: ----------- some more components integrated Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLPStrict.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLPStrict.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLPStrict.java 2008-09-09 11:24:26 UTC (rev 1183) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLPStrict.java 2008-09-09 11:38:48 UTC (rev 1184) @@ -30,6 +30,7 @@ import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.DoubleConfigOption; import org.dllearner.core.config.InvalidConfigOptionValueException; +import org.dllearner.core.configurators.PosNegDefinitionLPStrictConfigurator; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.Negation; @@ -51,8 +52,15 @@ private static final double defaultErrorPenalty = 3; private double errorPenalty = defaultErrorPenalty; + private PosNegDefinitionLPStrictConfigurator configurator; + + public PosNegDefinitionLPStrictConfigurator getConfigurator(){ + return configurator; + } + public PosNegDefinitionLPStrict(ReasoningService reasoningService) { super(reasoningService); + this.configurator = new PosNegDefinitionLPStrictConfigurator(this); } /* (non-Javadoc) Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-09-09 11:24:26 UTC (rev 1183) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-09-09 11:38:48 UTC (rev 1184) @@ -24,10 +24,14 @@ import org.dllearner.core.ReasoningService; import org.dllearner.core.Score; +import org.dllearner.core.config.CommonConfigMappings; +import org.dllearner.core.configurators.ComponentFactory; +import org.dllearner.core.configurators.PosNegInclusionLPConfigurator; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.Negation; import org.dllearner.utilities.Helper; +import org.dllearner.utilities.datastructures.SetManipulation; /** * The aim of this learning problem is to find an appropriate inclusion axiom @@ -51,9 +55,15 @@ public class PosNegInclusionLP extends PosNegLP implements InclusionLP { private PosNegDefinitionLP definitionLP; + private PosNegInclusionLPConfigurator configurator; + public PosNegInclusionLPConfigurator getConfigurator(){ + return configurator; + } + public PosNegInclusionLP(ReasoningService reasoningService) { super(reasoningService); + configurator = new PosNegInclusionLPConfigurator(this); } /* public static Collection<ConfigOption<?>> createConfigOptions() { @@ -85,7 +95,11 @@ @Override public void init() { super.init(); - definitionLP = new PosNegDefinitionLP(reasoningService, negativeExamples, positiveExamples); + definitionLP = ComponentFactory.getPosNegDefinitionLP( + reasoningService, + SetManipulation.indToString(negativeExamples), + SetManipulation.indToString(positiveExamples)); + //definitionLP = new PosNegDefinitionLP(reasoningService, negativeExamples, positiveExamples); // TODO: we must make sure that the problem also gets the same // reasoning options (i.e. options are the same up to reversed example sets) definitionLP.init(); Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java 2008-09-09 11:24:26 UTC (rev 1183) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java 2008-09-09 11:38:48 UTC (rev 1184) @@ -21,8 +21,11 @@ import org.dllearner.core.ReasoningService; import org.dllearner.core.Score; +import org.dllearner.core.configurators.ComponentFactory; +import org.dllearner.core.configurators.PosOnlyDefinitionLPConfigurator; import org.dllearner.core.owl.Description; import org.dllearner.utilities.Helper; +import org.dllearner.utilities.datastructures.SetManipulation; /** * Definition learning problem from only positive examples. @@ -33,9 +36,15 @@ public class PosOnlyDefinitionLP extends PosOnlyLP implements DefinitionLP { private PosNegDefinitionLP definitionLP; + private PosOnlyDefinitionLPConfigurator configurator; + public PosOnlyDefinitionLPConfigurator getConfigurator(){ + return configurator; + } + public PosOnlyDefinitionLP(ReasoningService reasoningService) { super(reasoningService); + configurator = new PosOnlyDefinitionLPConfigurator(this); } /* @@ -58,6 +67,10 @@ // create an instance of a standard definition learning problem // instanciated with pseudo-negatives + definitionLP = ComponentFactory.getPosNegDefinitionLP( + reasoningService, + SetManipulation.indToString(positiveExamples), + SetManipulation.indToString(pseudoNegatives)); definitionLP = new PosNegDefinitionLP(reasoningService, positiveExamples, pseudoNegatives); // TODO: we must make sure that the problem also gets the same // reasoning options (i.e. options are the same up to reversed example sets) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |