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); }
la.setNoisePercentage(25); la.setMaxNrOfResults(100); la.init();
la.setMaxExecutionTimeInSeconds(10); la.setNoisePercentage(25); la.init(); startTime = System.currentTimeMillis(); System.out.print("running CELOE (for " + (equivalence ? "equivalent classes" : "sub classes") + ") ... ");
la.setOperator(op); la.init(); la.start();
alg.setMaxExecutionTimeInSeconds(0); alg.setOperator(op); alg.init();
alg.setReasoner(reasoner); alg.init();
alg.setSearchTreeFile("log/search-tree.log"); alg.setReplaceSearchTree(true); alg.init();
celoe.setNoisePercentage(noisePercent); celoe.setMaxNrOfResults(10); celoe.init();
la.init(); ((RhoDRDown)la.getOperator()).setUseNegation(false);
alg.setSearchTreeFile("log/search-tree.log"); alg.setReplaceSearchTree(true); alg.init(); alg.setKeepTrackOfBestScore(true);
alg.setSearchTreeFile("/tmp/dllearner/search-tree.log"); alg.setReplaceSearchTree(true); alg.init();
alg.setMaxExecutionTimeInSeconds(0); alg.setOperator(op); alg.init();
la.setNoisePercentage(100.0); la.setOperator(op); la.init();
alg.setSearchTreeFile("log/search-tree.log"); alg.setReplaceSearchTree(true); alg.init();