lp.init(); CELOE alg = new CELOE(lp, rc); alg.setMaxExecutionTimeInSeconds(10); alg.setWriteSearchTree(true); alg.setSearchTreeFile("log/search-tree.log"); alg.setReplaceSearchTree(true); alg.init(); alg.start();
public CELOE(CELOE celoe){ setReasoner(celoe.reasoner); setLearningProblem(celoe.learningProblem); setAllowedConcepts(celoe.getAllowedConcepts()); setAllowedObjectProperties(celoe.getAllowedObjectProperties()); setAllowedDataProperties(celoe.getAllowedDataProperties()); setIgnoredConcepts(celoe.ignoredConcepts); setIgnoredObjectProperties(celoe.getIgnoredObjectProperties()); setIgnoredDataProperties(celoe.getIgnoredDataProperties()); setExpandAccuracy100Nodes(celoe.expandAccuracy100Nodes); setFilterDescriptionsFollowingFromKB(celoe.filterDescriptionsFollowingFromKB); setHeuristic(celoe.heuristic); setMaxClassExpressionTests(celoe.maxClassExpressionTests); setMaxClassExpressionTestsAfterImprovement(celoe.maxClassExpressionTestsAfterImprovement); setMaxDepth(celoe.maxDepth); setMaxExecutionTimeInSeconds(celoe.getMaxExecutionTimeInSeconds()); setMaxExecutionTimeInSecondsAfterImprovement(celoe.maxExecutionTimeInSecondsAfterImprovement); setMaxNrOfResults(celoe.maxNrOfResults); setNoisePercentage(celoe.noisePercentage); setOperator(op); setReuseExistingDescription(celoe.reuseExistingDescription); setSingleSuggestionMode(celoe.singleSuggestionMode); setStartClass(celoe.startClass); setStopOnFirstDefinition(celoe.stopOnFirstDefinition);
public static void main(String[] args) throws Exception { KnowledgeSource ks = new OWLFile("../examples/swore/swore.rdf"); AbstractReasonerComponent rc = new ClosedWorldReasoner(ks); rc.init(); ClassLearningProblem lp = new ClassLearningProblem(rc); lp.setClassToDescribe(new OWLClassImpl(IRI.create("http://ns.softwiki.de/req/CustomerRequirement"))); lp.init(); CELOE celoe = new CELOE(lp, rc); celoe.setNoisePercentage(1.0); celoe.setMaxExecutionTimeInSeconds(3); celoe.init(); celoe.start(); List<OWLClassExpression> descriptions = new ArrayList<>(); for (EvaluatedDescription<? extends Score> ed : celoe.getCurrentlyBestEvaluatedDescriptions(100)) { if(((EvaluatedDescriptionClass)ed).getAdditionalInstances().size() > 0){ System.out.println(ed); System.out.println(((EvaluatedDescriptionClass)ed).getAdditionalInstances()); descriptions.add(ed.getDescription()); } if(descriptions.size() == 3) break; } // descriptions.addAll(celoe.getCurrentlyBestDescriptions(2)); // descriptions.add(new NamedClass("http://ns.softwiki.de/req/Requirement")); // descriptions.add(new NamedClass("http://ns.softwiki.de/req/Customer")); DescriptionLinearClassifier dlc = new DescriptionLinearClassifier(lp, rc); dlc.getLinearCombination(descriptions); }
OEHeuristicRuntime heuristic = new OEHeuristicRuntime(); heuristic.setExpansionPenaltyFactor(0.1); la = new CELOE(lp, rc); ((CELOE) la).setHeuristic(heuristic); ((CELOE) la).setMaxExecutionTimeInSeconds(1800); ((CELOE) la).setNoisePercentage(80); ((CELOE) la).setMaxNrOfResults(50); ((CELOE) la).setWriteSearchTree(false); ((CELOE) la).setReplaceSearchTree(true); ((CELOE) la).setSearchTreeFile("log/mouse-diabetis.log"); OWLClassExpression startClass = new OWLClassImpl(IRI.create("http://dl-learner.org/smallis/Allelic_info")); ((CELOE) la).setStartClass(startClass); logger.debug("finished initializing learning algorithm"); logger.debug("initializing operator..."); op.init(); logger.debug("finished initializing operator"); ((CELOE) la).setOperator(op);
heuristic.setExpansionPenaltyFactor(0.01); la = new CELOE(lp, baseReasoner); la.setHeuristic(heuristic); la.setMaxExecutionTimeInSeconds(36000); la.setMaxDepth(30); la.setNoisePercentage(20); la.setMaxNrOfResults(70); la.setWriteSearchTree(true); la.setReplaceSearchTree(true); la.setSearchTreeFile("log/mouse-diabetis.log"); op.init(); logger.info("finished initializing operator"); la.setOperator(op); la.init(); la.start();
lp.init(); CELOE celoe = new CELOE(lp, reasoner); celoe.setMaxExecutionTimeInSeconds(algorithmRuntimeInSeconds); celoe.setNoisePercentage(noisePercent); celoe.setMaxNrOfResults(10); celoe.init(); RhoDRDown op = (RhoDRDown) celoe.getOperator(); op.setUseNegation(false); op.setFrequencyThreshold(10); op.setUseDataHasValueConstructor(true); celoe.start(); classExpressionTestsStat.addNumber(celoe.getClassExpressionTests()); EvaluatedDescription best = celoe.getCurrentlyBestEvaluatedDescription(); double bestAcc = best.getAccuracy(); if (i == 0) { .getCurrentlyBestEvaluatedDescriptions(); List<EvaluatedDescriptionClass> suggestionsList = new LinkedList<>( suggestions.descendingSet());
op.init(); CELOE alg = new CELOE(lp, rc); alg.setMaxClassExpressionTests(1000); alg.setMaxExecutionTimeInSeconds(0); alg.setOperator(op); alg.init(); alg.start(); OWLClassExpression soln = alg.getCurrentlyBestDescription();
lp.init(); CELOE la = new CELOE(lp, rc); la.setWriteSearchTree(true); la.setSearchTreeFile("log/punning_search_tree.txt"); la.setReplaceSearchTree(true); la.setMaxNrOfResults(50); la.setMaxExecutionTimeInSeconds(20); la.setExpandAccuracy100Nodes(true); OEHeuristicRuntime heuristic = new OEHeuristicRuntime(); la.init(); ((RhoDRDown)la.getOperator()).setUseNegation(false); Set<OWLClassExpression> refinements = la.getOperator().refine(d, OWLClassExpressionUtils.getLength(d) + 4); for (OWLClassExpression ref : refinements) { System.out.println(ref);
lp.init(); CELOE la = new CELOE(lp, rc); la.setMaxExecutionTimeInSeconds(10); la.init(); RhoDRDown op = (RhoDRDown) la.getOperator(); op.setUseCardinalityRestrictions(false); op.setUseHasValueConstructor(true); la.setNoisePercentage(20); la.init(); la.start(); OWLClassExpression desc = la.getCurrentlyBestDescription();
CELOE alg = new CELOE(); alg.setMaxExecutionTimeInSeconds(1); alg.setLearningProblem(lp); alg.setReasoner(reasoner); alg.init(); alg.start();
lp.init(); CELOE la = new CELOE(lp, closedWorldReasoner); la.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds); la.init(); la.start(); } catch (Exception | Error e) { e.printStackTrace();
CELOE la = new CELOE(lp, reasoner); la.setNoisePercentage(100.0); la.setOperator(op); la.init();
@Override public Object clone() throws CloneNotSupportedException { return new CELOE(this); }
heuristic.setExpansionPenaltyFactor(0.1); CELOE celoe = new CELOE(lp, rc); celoe.setHeuristic(heuristic); celoe.setMaxExecutionTimeInSeconds(60*60*12); celoe.setNoisePercentage(80); celoe.setMaxNrOfResults(50); celoe.setSearchTreeFile("log/reactome-minimal.log"); celoe.setReplaceSearchTree(true); logger.debug("finished initializing operator"); if(la instanceof CELOE) ((CELOE) la).setOperator(op);
op.init(); CELOE alg = new CELOE(lp, reasoner); alg.setMaxClassExpressionTests(1000); alg.setMaxExecutionTimeInSeconds(0); alg.setOperator(op); alg.init(); alg.start();
final AbstractCELA la = new CELOE(lp, reasoner); la.init();
heuristic.setExpansionPenaltyFactor(0.1); CELOE celoe = new CELOE(lp, rc); celoe.setHeuristic(heuristic); celoe.setMaxExecutionTimeInSeconds(300); celoe.setNoisePercentage(50); celoe.setMaxNrOfResults(10); celoe.setWriteSearchTree(true); celoe.setReplaceSearchTree(true); logger.debug("finished initializing operator"); if(la instanceof CELOE) ((CELOE) la).setOperator(op);
CELOE alg = new CELOE(lp, rc); alg.setMaxExecutionTimeInSeconds(10); alg.setWriteSearchTree(true); alg.setSearchTreeFile("/tmp/dllearner/search-tree.log"); alg.setReplaceSearchTree(true); alg.init(); alg.start();
lp.init(); CELOE la = new CELOE(lp, rc); la.setMaxExecutionTimeInSeconds(10); la.setNoisePercentage(25); la.setMaxNrOfResults(100); la.init(); la.start(); runTime = System.currentTimeMillis() - startTime; System.out.println("done in " + runTime + " ms"); List<? extends EvaluatedDescription<? extends Score>> learnedDescriptions = la.getCurrentlyBestEvaluatedDescriptions(threshold); List<EvaluatedAxiom<OWLAxiom>> learnedAxioms = new LinkedList<>(); for(EvaluatedDescription<? extends Score> learnedDescription : learnedDescriptions) {