From: <jen...@us...> - 2013-11-11 14:48:24
|
Revision: 4143 http://sourceforge.net/p/dl-learner/code/4143 Author: jenslehmann Date: 2013-11-11 14:48:21 +0000 (Mon, 11 Nov 2013) Log Message: ----------- ISLE Bible Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java trunk/components-core/src/test/java/org/dllearner/algorithms/isle/Experiment.java Modified: trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java 2013-11-11 13:38:04 UTC (rev 4142) +++ trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java 2013-11-11 14:48:21 UTC (rev 4143) @@ -84,7 +84,7 @@ * domain/range restrictions. Furthermore, it makes use of disjoint * classes in the knowledge base. * - * TODO Some of the code has moved to {@link Utility} in a modified + * Note: Some of the code has moved to {@link Utility} in a modified * form to make it accessible for implementations of other refinement * operators. These utility methods may be completed and carefully * integrated back later. @@ -232,48 +232,12 @@ } -// public RhoDRDown(AbstractReasonerComponent reasoningService) { -//// this(reasoningService, reasoningService.getClassHierarchy(), null, true, true, true, true, true, 3, true, true, true, true, null); -// this.reasoner = reasoningService; -// this.subHierarchy = reasoner.getClassHierarchy(); -// init(); -// } - - // TODO constructor which takes a RhoDRDownConfigurator object; - // this should be an interface implemented e.g. by ExampleBasedROLComponentConfigurator; - // the goal is to use the configurator system while still being flexible enough to - // use one refinement operator in several learning algorithms -// public RhoDRDown(AbstractReasonerComponent reasoningService, ClassHierarchy subHierarchy, boolean applyAllFilter, boolean applyExistsFilter, boolean useAllConstructor, -// boolean useExistsConstructor, boolean useHasValueConstructor, int valueFrequencyThreshold, boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, boolean useDoubleDatatypes, NamedClass startClass, -// int cardinalityLimit, boolean useStringDatatypes, boolean instanceBasedDisjoints) { -// this.reasoner = reasoningService; -// this.subHierarchy = subHierarchy; -// this.applyAllFilter = applyAllFilter; -// this.applyExistsFilter = applyExistsFilter; -// this.useAllConstructor = useAllConstructor; -// this.useExistsConstructor = useExistsConstructor; -// this.useHasValueConstructor = useHasValueConstructor; -// this.frequencyThreshold = valueFrequencyThreshold; -// this.useCardinalityRestrictions = useCardinalityRestrictions; -// this.cardinalityLimit = cardinalityLimit; -// this.useNegation = useNegation; -// this.useBooleanDatatypes = useBooleanDatatypes; -// this.useDoubleDatatypes = useDoubleDatatypes; -// this.useStringDatatypes = useStringDatatypes; -// this.instanceBasedDisjoints = instanceBasedDisjoints; -// if(startClass != null) { -// this.startClass = startClass; -// } -// init(); -// } - -// subHierarchy = rs.getClassHierarchy(); public void init() throws ComponentInitException { if(isInitialised) { throw new ComponentInitException("Refinement operator cannot be nitialised twice."); } // System.out.println("subHierarchy: " + subHierarchy); -// System.out.println("object properties: " + ); +// System.out.println("object properties: " + reasoner.getObjectProperties()); // query reasoner for domains and ranges // (because they are used often in the operator) Modified: trunk/components-core/src/test/java/org/dllearner/algorithms/isle/Experiment.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/algorithms/isle/Experiment.java 2013-11-11 13:38:04 UTC (rev 4142) +++ trunk/components-core/src/test/java/org/dllearner/algorithms/isle/Experiment.java 2013-11-11 14:48:21 UTC (rev 4143) @@ -225,7 +225,8 @@ Map<Entity, Double> entityRelevance = RelevanceUtils.getRelevantEntities(cls, ontology, relevance); NLPHeuristic heuristic = new NLPHeuristic(entityRelevance); - heuristic.setStartNodeBonus(100); + // heuristic.setStartNodeBonus(100); + heuristic.init(); ClassLearningProblem clp = new ClassLearningProblem(reasoner); clp.setClassToDescribe(cls); @@ -235,13 +236,13 @@ RhoDRDown rop = new RhoDRDown(); rop.setReasoner(reasoner); - rop.setUseNegation(false); + rop.setUseNegation(true); rop.init(); // perform cross validation with ISLE ISLE isle = new ISLE(clp, reasoner); isle.setHeuristic(heuristic); - isle.setMaxNrOfResults(30); + isle.setMaxNrOfResults(1); isle.setOperator(rop); // isle.setStartClass(startClass); new File(testFolder).mkdirs(); @@ -251,6 +252,7 @@ // isle.setTerminateOnNoiseReached(true); isle.setIgnoredConcepts(Collections.singleton(cls)); isle.setReplaceSearchTree(true); + isle.setMaxExecutionTimeInSeconds(10); isle.init(); isle.start();System.exit(1); List<? extends EvaluatedDescription> currentlyBestDescriptions = isle.getCurrentlyBestEvaluatedDescriptions(20); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |