From: <jen...@us...> - 2007-08-28 10:57:56
|
Revision: 80 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=80&view=rev Author: jenslehmann Date: 2007-08-28 03:57:53 -0700 (Tue, 28 Aug 2007) Log Message: ----------- added script for generating statistics (initial test version) Added Paths: ----------- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java Added: trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-28 10:57:53 UTC (rev 80) @@ -0,0 +1,121 @@ +/** + * Copyright (C) 2007, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.utilities; + +import java.io.File; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.dllearner.Config; +import org.dllearner.LearningProblem; +import org.dllearner.Main; +import org.dllearner.OntologyFileFormat; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.dl.AtomicConcept; +import org.dllearner.dl.Individual; +import org.dllearner.dl.KB; +import org.dllearner.parser.DLLearner; +import org.dllearner.reasoning.Reasoner; +import org.dllearner.reasoning.ReasoningMethodUnsupportedException; +import org.dllearner.reasoning.ReasoningService; + +/** + * Utility script for creating statistics for publications. + * (Warning: Scripts may run for several hours.) + * + * @author Jens Lehmann + * + */ +public class PaperStatistics { + + /** + * Points to the current statistic generation function. + * + * @param args None. + */ + public static void main(String[] args) { + createStatistics(); + } + + @SuppressWarnings("unused") + private static void createStatistics() { + + // set reasoner URL + try { + Config.digReasonerURL = new URL("http://localhost:8081"); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + + // used OWL files + File fatherOwlFile = new File("examples/father.owl"); + String fatherConfFile = "examples/father2.conf"; + URL ontologyFatherURL = null; + try { + ontologyFatherURL = new URL("file", "localhost", fatherOwlFile.getAbsolutePath()); + } catch (MalformedURLException e1) { + e1.printStackTrace(); + } + + Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); + m.put(ontologyFatherURL, OntologyFileFormat.RDF_XML); + + // initialise reasoner + Reasoner reasoner = Main.createReasoner(new KB(), m); + ReasoningService rs = new ReasoningService(reasoner); + + Main.autoDetectConceptsAndRoles(rs); + if (Config.Refinement.improveSubsumptionHierarchy) { + try { + reasoner.prepareSubsumptionHierarchy(); + reasoner.prepareRoleHierarchy(); + reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); + } catch (ReasoningMethodUnsupportedException e) { + e.printStackTrace(); + } + } + + // file is parsed, but we use only the specified examples really + // (everything else is ignored) + DLLearner.parseFile(fatherConfFile); + + SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); + SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); + Map<AtomicConcept,SortedSet<Individual>> posExamplesTmp = DLLearner.getPositiveExamples(); + Map<AtomicConcept,SortedSet<Individual>> negExamplesTmp = DLLearner.getNegativeExamples(); + + for (AtomicConcept target : posExamplesTmp.keySet()) + positiveExamples = posExamplesTmp.get(target); + + for (AtomicConcept target : negExamplesTmp.keySet()) + negativeExamples = negExamplesTmp.get(target); + + LearningProblem learningProblem = new LearningProblem(rs, positiveExamples, negativeExamples); + ROLearner learner = new ROLearner(learningProblem); + learner.start(); + System.out.println(learner.getBestSolution().toString()); + + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-30 06:17:05
|
Revision: 118 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=118&view=rev Author: jenslehmann Date: 2007-08-29 23:16:51 -0700 (Wed, 29 Aug 2007) Log Message: ----------- statistical settings updated Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java Modified: trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-29 17:15:31 UTC (rev 117) +++ trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-30 06:16:51 UTC (rev 118) @@ -208,7 +208,7 @@ Config.GP.selectionType = GP.SelectionType.RANK_SELECTION; Config.GP.generations = 50; Config.GP.useFixedNumberOfGenerations = true; - Config.GP.numberOfIndividuals = 401; + Config.GP.numberOfIndividuals = 201; Config.GP.refinementProbability = 0; Config.GP.mutationProbability = 0.02; Config.GP.crossoverProbability = 0.8; @@ -221,7 +221,7 @@ Config.GP.selectionType = GP.SelectionType.RANK_SELECTION; Config.GP.generations = 50; Config.GP.useFixedNumberOfGenerations = true; - Config.GP.numberOfIndividuals = 401; + Config.GP.numberOfIndividuals = 201; Config.GP.refinementProbability = 0.65; Config.GP.mutationProbability = 0.02; Config.GP.crossoverProbability = 0.2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-09-01 01:34:45
|
Revision: 86 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=86&view=rev Author: jenslehmann Date: 2007-08-28 06:24:54 -0700 (Tue, 28 Aug 2007) Log Message: ----------- intermediate commit for statistics generation script Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java Modified: trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-28 13:23:47 UTC (rev 85) +++ trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-28 13:24:54 UTC (rev 86) @@ -23,6 +23,7 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; @@ -61,6 +62,54 @@ @SuppressWarnings("unused") private static void createStatistics() { + // experimental setup: + + // algorithms: refinement, GP, hybrid GP (YinYang) + // settings GP: + // - average over 10 runs + // ... + // settings Hybrid GP: + // - average over 10 runs + // ... + // settings refinement: + // - single run + // ... + + // observations: + // - correctness + // - concept length + // - runtime + + // learning examples: + // - trains + // - arches + // - moral (simple) + // - moral (complex) + // - poker (pair) + // - poker (straight) + // - uncle (FORTE) + // - more? + + String exampleBaseDir = "examples/"; + + File[] confFiles = new File[1]; + confFiles[0] = new File(exampleBaseDir, "trains/trains.conf"); + + /* + Stat[][] statAr = new Stat[4][3]; + File[][] fileAr = new File[4][3]; + + fileAr[0][0] = new File(baseDir, "gnuplot/hybrid100classification.data"); + fileAr[0][1] = new File(baseDir, "gnuplot/hybrid100length.data"); + fileAr[0][2] = new File(baseDir, "gnuplot/hybrid100runtime.data"); + fileAr[1][0] = new File(baseDir, "gnuplot/hybrid50classification.data"); + fileAr[1][1] = new File(baseDir, "gnuplot/hybrid50length.data"); + fileAr[1][2] = new File(baseDir, "gnuplot/hybrid50runtime.data"); + fileAr[2][0] = new File(baseDir, "gnuplot/gpclassification.data"); + fileAr[2][1] = new File(baseDir, "gnuplot/gplength.data"); + fileAr[2][2] = new File(baseDir, "gnuplot/gpruntime.data"); + */ + // set reasoner URL try { Config.digReasonerURL = new URL("http://localhost:8081"); @@ -68,21 +117,17 @@ e.printStackTrace(); } - // used OWL files - File fatherOwlFile = new File("examples/father.owl"); String fatherConfFile = "examples/father2.conf"; - URL ontologyFatherURL = null; - try { - ontologyFatherURL = new URL("file", "localhost", fatherOwlFile.getAbsolutePath()); - } catch (MalformedURLException e1) { - e1.printStackTrace(); - } - Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); - m.put(ontologyFatherURL, OntologyFileFormat.RDF_XML); + // file is parsed, but we use only the specified examples really + // (everything else is ignored) + DLLearner.parseFile(fatherConfFile); + // DLLearner.parseFile(fatherConfFile); + Map<URL, OntologyFileFormat> imports = getImports(DLLearner.getFunctionCalls()); + // initialise reasoner - Reasoner reasoner = Main.createReasoner(new KB(), m); + Reasoner reasoner = Main.createReasoner(new KB(), imports); ReasoningService rs = new ReasoningService(reasoner); Main.autoDetectConceptsAndRoles(rs); @@ -96,10 +141,6 @@ } } - // file is parsed, but we use only the specified examples really - // (everything else is ignored) - DLLearner.parseFile(fatherConfFile); - SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); Map<AtomicConcept,SortedSet<Individual>> posExamplesTmp = DLLearner.getPositiveExamples(); @@ -110,6 +151,8 @@ for (AtomicConcept target : negExamplesTmp.keySet()) negativeExamples = negExamplesTmp.get(target); + + LearningProblem learningProblem = new LearningProblem(rs, positiveExamples, negativeExamples); ROLearner learner = new ROLearner(learningProblem); @@ -118,4 +161,46 @@ } + private static Map<URL, OntologyFileFormat> getImports(List<List<String>> functionCalls) { + Map<URL, OntologyFileFormat> importedFiles = new HashMap<URL, OntologyFileFormat>(); + + OntologyFileFormat format = null; + URL url = null; + + for (List<String> call : functionCalls) { + + if(call.get(0).equals("import")) { + // alte Methode mit file statt URI + // File f = new File(baseDir, call.get(1)); + + try { + String fileString = call.get(1); + if(fileString.startsWith("http:")) { + url = new URL(fileString); + } else { + File f = new File("examples", call.get(1)); + url = f.toURI().toURL(); + } + } catch (MalformedURLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + if (call.size() == 2) + // falls nichts angegeben, dann wird RDF/XML gewählt + importedFiles.put(url, OntologyFileFormat.RDF_XML); + else { + String formatString = call.get(2); + if (formatString.equals("RDF/XML")) + format = OntologyFileFormat.RDF_XML; + else + format = OntologyFileFormat.N_TRIPLES; + importedFiles.put(url, format); + } + } + } + + return importedFiles; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-29 14:39:46
|
Revision: 110 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=110&view=rev Author: jenslehmann Date: 2007-08-29 07:39:45 -0700 (Wed, 29 Aug 2007) Log Message: ----------- updated statistics script Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java Modified: trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-29 14:39:12 UTC (rev 109) +++ trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-29 14:39:45 UTC (rev 110) @@ -99,13 +99,21 @@ String gnuplotBaseDir = "log/gnuplot/"; String statBaseDir = "log/stat/"; - File[] confFiles = new File[2]; - confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl.conf"); - confFiles[1] = new File(exampleBaseDir, "father2.conf"); + File[] confFiles = new File[6]; + confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl.conf"); + confFiles[1] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl.conf"); + confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl.conf"); + confFiles[3] = new File(exampleBaseDir + "poker", "pair_owl.conf"); + confFiles[4] = new File(exampleBaseDir + "poker", "straight_owl.conf"); + confFiles[5] = new File(exampleBaseDir + "forte", "forte_uncle_owl.conf"); - String[] examples = new String[2]; + String[] examples = new String[6]; examples[0] = "trains"; - examples[1] = "father"; + examples[1] = "moral reasoner (43 examples, simple)"; + examples[2] = "moral reasoner (43 examples, complex)"; + examples[3] = "poker (49 examples, pair)"; + examples[4] = "poker (55 examples, straight)"; + examples[5] = "uncle (FORTE data set)"; String[] algorithms = new String[3]; algorithms[0] = "refinement"; @@ -189,24 +197,35 @@ LearningAlgorithm learningAlgorithm = null; if(algorithmNr==0) { Config.algorithm = Algorithm.REFINEMENT; + Config.Refinement.heuristic = Config.Refinement.Heuristic.FLEXIBLE; + Config.Refinement.horizontalExpansionFactor = 0.6; + Config.percentPerLengthUnit = 0.05; learningAlgorithm = new ROLearner(learningProblem); } else if(algorithmNr==1) { Config.algorithm = Algorithm.GP; - Config.GP.numberOfIndividuals = 21; - Config.GP.algorithmType = GP.AlgorithmType.GENERATIONAL; + Config.GP.algorithmType = GP.AlgorithmType.GENERATIONAL; + Config.GP.selectionType = GP.SelectionType.RANK_SELECTION; + Config.GP.generations = 50; + Config.GP.useFixedNumberOfGenerations = true; + Config.GP.numberOfIndividuals = 401; Config.GP.refinementProbability = 0; Config.GP.mutationProbability = 0.02; Config.GP.crossoverProbability = 0.8; - Config.GP.hillClimbingProbability = 0; + Config.GP.hillClimbingProbability = 0; + Config.percentPerLengthUnit = 0.005; learningAlgorithm = new GP(learningProblem); } else if(algorithmNr==2) { Config.algorithm = Algorithm.HYBRID_GP; - Config.GP.numberOfIndividuals = 11; - Config.GP.algorithmType = GP.AlgorithmType.GENERATIONAL; + Config.GP.algorithmType = GP.AlgorithmType.GENERATIONAL; + Config.GP.selectionType = GP.SelectionType.RANK_SELECTION; + Config.GP.generations = 50; + Config.GP.useFixedNumberOfGenerations = true; + Config.GP.numberOfIndividuals = 401; Config.GP.refinementProbability = 0.65; Config.GP.mutationProbability = 0.02; Config.GP.crossoverProbability = 0.2; Config.GP.hillClimbingProbability = 0; + Config.percentPerLengthUnit = 0.005; learningAlgorithm = new GP(learningProblem); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-30 18:57:18
|
Revision: 119 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=119&view=rev Author: jenslehmann Date: 2007-08-30 11:57:02 -0700 (Thu, 30 Aug 2007) Log Message: ----------- added detailed statistics and incremental statistics updates Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java Modified: trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-30 06:16:51 UTC (rev 118) +++ trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-30 18:57:02 UTC (rev 119) @@ -99,21 +99,23 @@ String gnuplotBaseDir = "log/gnuplot/"; String statBaseDir = "log/stat/"; - File[] confFiles = new File[6]; + File[] confFiles = new File[7]; confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl.conf"); - confFiles[1] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl.conf"); - confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl.conf"); - confFiles[3] = new File(exampleBaseDir + "poker", "pair_owl.conf"); - confFiles[4] = new File(exampleBaseDir + "poker", "straight_owl.conf"); - confFiles[5] = new File(exampleBaseDir + "forte", "forte_uncle_owl.conf"); + confFiles[1] = new File(exampleBaseDir + "arch", "arch_owl.conf"); + confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl.conf"); + confFiles[3] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl.conf"); + confFiles[4] = new File(exampleBaseDir + "poker", "pair_owl.conf"); + confFiles[5] = new File(exampleBaseDir + "poker", "straight_owl.conf"); + confFiles[6] = new File(exampleBaseDir + "forte", "forte_uncle_owl.conf"); - String[] examples = new String[6]; + String[] examples = new String[7]; examples[0] = "trains"; - examples[1] = "moral reasoner (43 examples, simple)"; - examples[2] = "moral reasoner (43 examples, complex)"; - examples[3] = "poker (49 examples, pair)"; - examples[4] = "poker (55 examples, straight)"; - examples[5] = "uncle (FORTE data set)"; + examples[1] = "arches"; + examples[2] = "moral reasoner (43 examples, simple)"; + examples[3] = "moral reasoner (43 examples, complex)"; + examples[4] = "poker (49 examples, pair)"; + examples[5] = "poker (55 examples, straight)"; + examples[6] = "uncle (FORTE data set)"; String[] algorithms = new String[3]; algorithms[0] = "refinement"; @@ -133,7 +135,9 @@ //} File statFile = new File(statBaseDir, "statistics.txt"); + File statDetailsFile = new File(statBaseDir, "statistics_details.txt"); String statString = "**automatically generated statistics**\n\n"; + String statDetailsString = statString; // just set default options ConfigurationManager confMgr = new ConfigurationManager(); @@ -197,7 +201,7 @@ LearningAlgorithm learningAlgorithm = null; if(algorithmNr==0) { Config.algorithm = Algorithm.REFINEMENT; - Config.Refinement.heuristic = Config.Refinement.Heuristic.FLEXIBLE; + // Config.Refinement.heuristic = Config.Refinement.Heuristic.FLEXIBLE; Config.Refinement.horizontalExpansionFactor = 0.6; Config.Refinement.quiet = true; Config.percentPerLengthUnit = 0.05; @@ -247,20 +251,29 @@ runtime.addNumber(algorithmTime); // free knowledge base to avoid memory leaks - ((DIGReasoner) reasoner).releaseKB(); + ((DIGReasoner) reasoner).releaseKB(); + + statDetailsString += "example: " + examples[exampleNr] + "\n"; + statDetailsString += "algorithm: " + algorithms[algorithmNr] + "\n"; + statDetailsString += "learned concept: " + learningAlgorithm.getBestSolution() + "\n"; + statDetailsString += "concept length: " + length.getMean() + "\n"; + statDetailsString += "runtime: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getMean())) + "\n\n"; - } + Main.createFile(statDetailsFile, statDetailsString); + + } // end run loop statString += "algorithm: " + algorithms[algorithmNr] + " (runs: " + algorithmRuns[algorithmNr] + ")\n"; statString += "classification: " + classification.getMean() + "% (standard deviation: " + classification.getStandardDeviation() + "%)\n"; statString += "concept length: " + length.getMean() + " (standard deviation: " + length.getStandardDeviation() + ")\n"; statString += "runtime: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getMean())) + " (standard deviation: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getStandardDeviation())) + ")\n\n"; - } - - } + Main.createFile(statFile, statString); + + } // end algorithm loop + + } // end example loop - Main.createFile(statFile, statString); } private static Map<URL, OntologyFileFormat> getImports(List<List<String>> functionCalls, File confFile) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-30 19:06:28
|
Revision: 120 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=120&view=rev Author: jenslehmann Date: 2007-08-30 12:03:36 -0700 (Thu, 30 Aug 2007) Log Message: ----------- small fixes Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java Modified: trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-30 18:57:02 UTC (rev 119) +++ trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-30 19:03:36 UTC (rev 120) @@ -256,8 +256,9 @@ statDetailsString += "example: " + examples[exampleNr] + "\n"; statDetailsString += "algorithm: " + algorithms[algorithmNr] + "\n"; statDetailsString += "learned concept: " + learningAlgorithm.getBestSolution() + "\n"; - statDetailsString += "concept length: " + length.getMean() + "\n"; - statDetailsString += "runtime: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getMean())) + "\n\n"; + statDetailsString += "classification: " + classificationRatePercent + "\n"; + statDetailsString += "concept length: " + conceptLength + "\n"; + statDetailsString += "runtime: " + Helper.prettyPrintNanoSeconds(algorithmTime) + "\n\n"; Main.createFile(statDetailsFile, statDetailsString); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-09-03 16:59:03
|
Revision: 126 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=126&view=rev Author: jenslehmann Date: 2007-09-03 08:43:58 -0700 (Mon, 03 Sep 2007) Log Message: ----------- updated statistic settings Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java Modified: trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-08-31 15:30:09 UTC (rev 125) +++ trunk/src/dl-learner/org/dllearner/utilities/PaperStatistics.java 2007-09-03 15:43:58 UTC (rev 126) @@ -126,7 +126,8 @@ int[] algorithmRuns = {1,10,10}; int startAlgorithmNr = 0; - + Config.writeDIGProtocol = true; + Config.digProtocolFile = new File(statBaseDir, "dig.log"); // do not plot anything // File[][][] gnuplotFiles = new File[examples.length][algorithms.length][3]; @@ -169,7 +170,9 @@ statString += "example: " + examples[exampleNr] + "\n\n"; for(int algorithmNr=startAlgorithmNr; algorithmNr < algorithms.length; algorithmNr++) { - + // reset algorithm number (next example starts with first algorithm) + startAlgorithmNr = 0; + Stat classification = new Stat(); Stat length = new Stat(); Stat runtime = new Stat(); @@ -228,6 +231,10 @@ Config.GP.crossoverProbability = 0.8; Config.GP.hillClimbingProbability = 0; Config.percentPerLengthUnit = 0.005; + // give GP a chance to find the long solution of the + // uncle problem + if(exampleNr==3 || exampleNr == 6) + Config.percentPerLengthUnit = 0.002; learningAlgorithm = new GP(learningProblem); } else if(algorithmNr==2) { Config.algorithm = Algorithm.HYBRID_GP; @@ -243,6 +250,8 @@ Config.GP.crossoverProbability = 0.2; Config.GP.hillClimbingProbability = 0; Config.percentPerLengthUnit = 0.005; + if(exampleNr == 3 || exampleNr==6) + Config.percentPerLengthUnit = 0.002; learningAlgorithm = new GP(learningProblem); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |