source: trunk/CrossPareConfigurationBuilder/src/de/ugoe/cs/crosspare/ConfigurationBuilder.java

Last change on this file was 146, checked in by sherbold, 7 years ago
  • Property svn:mime-type set to text/plain
File size: 53.0 KB
Line 
1package de.ugoe.cs.crosspare;
2
3import java.io.File;
4import java.io.FileWriter;
5import java.io.IOException;
6import java.lang.reflect.InvocationTargetException;
7import java.security.InvalidParameterException;
8
9public class ConfigurationBuilder {
10   
11    private static enum Dataset {
12        MDP,
13        MDP_EFFNORM,
14        MDP_EFFLOGNORM,
15        JURECZKO,
16        FILTERJURECZKO,
17        SELECTEDJURECZKO,
18        JURECZKO_NUMERIC,
19        JURECZKO_EFFNORM,
20        JURECZKO_EFFLOGNORM,
21        JURECZKO_EFFNORM_NUMERIC,
22        JURECZKO_EFFLOGNORM_NUMERIC,
23        JURECZKO_NUMERIC_DUPLICATE,
24        JURECZKO_NUMERIC_WEIGHTS,
25        AEEEM,
26        AEEEM_LDHH,
27        AEEEM_WCHU,
28        AEEEM_LDHHWCHU,
29        AEEEM_NUMERIC,
30        AEEEM_LDHH_NUMERIC,
31        AEEEM_WCHU_NUMERIC,
32        AEEEM_LDHHWCHU_NUMERIC,
33        AEEEM_LDHHWCHU_EFFNORM,
34        AEEEM_LDHHWCHU_EFFLOGNORM,
35        AEEEM_LDHHWCHU_EFFNORM_NUMERIC,
36        AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC,
37        AEEEM_LDHHWCHU_NUMERIC_DUPLICATE,
38        AEEEM_LDHHWCHU_NUMERIC_WEIGHTS,
39        RELINK,
40        RELINK_EFFNORM,
41        RELINK_EFFLOGNORM,
42        NETGENE,
43        NETGENE_NUMERIC,
44        NETGENE_NUMERIC_DUPLICATE,
45        NETGENE_NUMERIC_WEIGHTS,
46        SMARTSHARK_ALL,
47        SMARTSHARK_AST,
48        SMARTSHARK_SM,
49        SMARTSHARK_ALL_NUMERIC
50    }
51   
52    private static final String storageFolder = "config/";
53   
54    private static final String HPCConfigFolder = "../cpdp-experiments/HPC/benchmark/";
55   
56    public static void main(String[] args) {
57        for( Dataset dataset : Dataset.values() ) {
58            // baselines
59            writeFile("ALL", dataset);
60            writeFile("CV", dataset);
61            writeFile("Random", dataset);
62            writeFile("Trivial", dataset);
63            // publications
64            writeFile("Koshgoftaar08", dataset);
65            writeFile("Watanabe08", dataset);
66            writeFile("Turhan09", dataset);
67            writeFile("Zimmermann09", dataset);
68            writeFile("CamargoCruz09", dataset);
69            writeFile("Liu10", dataset);
70            writeFile("Menzies11", dataset);
71            writeFile("Ma12", dataset);
72            writeFile("Peters12", dataset);
73            writeFile("Uchigaki12", dataset);
74            writeFile("Canfora13", dataset);
75            writeFile("Peters13", dataset);
76            writeFile("Herbold13", dataset);
77            writeFile("ZHe13", dataset);
78            writeFile("Nam13", dataset);
79            writeFile("Panichella14", dataset);
80            writeFile("Ryu14", dataset);
81            writeFile("PHe15", dataset);
82            writeFile("Peters15", dataset);
83            writeFile("Kawata15", dataset);
84            writeFile("YZhang15", dataset);
85            writeFile("Amasaki15", dataset);
86            writeFile("Ryu15", dataset);
87            writeFile("Nam15", dataset);
88            writeFile("Tantithamthavorn16", dataset);
89            writeFile("Hosseini16", dataset);
90            writeFile("FZhang16", dataset);
91        }
92    }
93   
94    public static void writeFile(String approach, Dataset dataset) {
95        File file = new File(storageFolder + dataset.toString() + "/"+  dataset.toString() + "-" + approach + ".xml");
96        file.getParentFile().mkdirs();
97        try(FileWriter writer = new FileWriter(file);) {
98            writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
99            writer.flush();
100        }
101        catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
102            e.printStackTrace();
103        }
104       
105        file = new File(storageFolder + "ALL/"+  dataset.toString() + "-" + approach + ".xml");
106        file.getParentFile().mkdirs();
107        try(FileWriter writer = new FileWriter(file);) {
108            writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
109            writer.flush();
110        }
111        catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
112            e.printStackTrace();
113        }
114       
115        if( approach.equals("Nam13") && (dataset.toString().startsWith("JUR") || dataset.toString().startsWith("NET") || dataset.toString().startsWith("MDP"))) {
116            file = new File(HPCConfigFolder + "config-infeasible/"+  dataset.toString() + "-" + approach + ".xml");
117            file.getParentFile().mkdirs();
118            try(FileWriter writer = new FileWriter(file);) {
119                writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
120                writer.flush();
121            }
122            catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
123                e.printStackTrace();
124            }
125        }
126        else if( dataset==Dataset.AEEEM_LDHHWCHU || dataset==Dataset.JURECZKO || dataset==Dataset.NETGENE || dataset==Dataset.RELINK || dataset==Dataset.MDP ) {
127            file = new File(HPCConfigFolder + "config/"+  dataset.toString() + "-" + approach + ".xml");
128            file.getParentFile().mkdirs();
129            try(FileWriter writer = new FileWriter(file);) {
130                writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
131                writer.flush();
132            }
133            catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
134                e.printStackTrace();
135            }
136        }
137        else if( dataset==Dataset.AEEEM_LDHHWCHU_NUMERIC_DUPLICATE || dataset==Dataset.JURECZKO_NUMERIC_DUPLICATE || dataset==Dataset.NETGENE_NUMERIC_DUPLICATE ) {
138            file = new File(HPCConfigFolder + "config-duplicates/"+  dataset.toString() + "-" + approach + ".xml");
139            file.getParentFile().mkdirs();
140            try(FileWriter writer = new FileWriter(file);) {
141                writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
142                writer.flush();
143            }
144            catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
145                e.printStackTrace();
146            }
147        }
148        else if( dataset==Dataset.AEEEM_LDHHWCHU_NUMERIC || dataset==Dataset.JURECZKO_NUMERIC || dataset==Dataset.NETGENE_NUMERIC ) {
149            file = new File(HPCConfigFolder + "config-numeric/"+  dataset.toString() + "-" + approach + ".xml");
150            file.getParentFile().mkdirs();
151            try(FileWriter writer = new FileWriter(file);) {
152                writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
153                writer.flush();
154            }
155            catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
156                e.printStackTrace();
157            }
158        }
159        else if( dataset==Dataset.AEEEM_LDHHWCHU_NUMERIC_WEIGHTS || dataset==Dataset.JURECZKO_NUMERIC_WEIGHTS || dataset==Dataset.NETGENE_NUMERIC_WEIGHTS ) {
160            file = new File(HPCConfigFolder + "config-weights/"+  dataset.toString() + "-" + approach + ".xml");
161            file.getParentFile().mkdirs();
162            try(FileWriter writer = new FileWriter(file);) {
163                writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
164                writer.flush();
165            }
166            catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
167                e.printStackTrace();
168            }
169        }
170        else if( dataset==Dataset.AEEEM_LDHHWCHU_EFFNORM_NUMERIC || dataset==Dataset.JURECZKO_EFFNORM_NUMERIC || dataset==Dataset.RELINK_EFFNORM || dataset==Dataset.MDP_EFFNORM ) {
171            file = new File(HPCConfigFolder + "config-effnorm/"+  dataset.toString() + "-" + approach + ".xml");
172            file.getParentFile().mkdirs();
173            try(FileWriter writer = new FileWriter(file);) {
174                writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
175                writer.flush();
176            }
177            catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
178                e.printStackTrace();
179            }
180        }
181    }
182   
183    public static void preamble(StringBuilder configFile) {
184        configFile.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
185        configFile.append("<config xmlns=\"experimentconfig\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"experimentconfig experimentconfig.xsd\">\n");
186    }
187   
188    public static void postamble(StringBuilder configFile) {
189        configFile.append(" <storage name=\"MySQLResultStorage\" param=\"\" />\n");
190        configFile.append("</config>");
191    }
192   
193    public static void trainers(StringBuilder configFile) {
194        configFile.append(" <trainer name=\"WekaTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
195        configFile.append(" <trainer name=\"WekaTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
196        configFile.append(" <trainer name=\"WekaTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
197        configFile.append(" <trainer name=\"WekaTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
198        configFile.append(" <trainer name=\"WekaTraining\" param=\"NET weka.classifiers.functions.RBFNetwork -CVPARAM W 0.1 10.0 3.0 L 2.0 18.0 3.0\" />\n");
199        configFile.append(" <trainer name=\"WekaTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
200    }
201   
202    public static void trainersBagging(StringBuilder configFile) {
203        configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
204        configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
205        configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
206        configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
207        configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"NET weka.classifiers.functions.RBFNetwork -CVPARAM W 0.1 10.0 3.0 L 2.0 18.0 3.0\" />\n");
208        configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
209    }
210   
211    public static void trainersLocalWhere(StringBuilder configFile) {
212        configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
213        configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
214        configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
215        configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
216        configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"NET weka.classifiers.functions.RBFNetwork -CVPARAM W 0.1 10.0 3.0 L 2.0 18.0 3.0\" />\n");
217        configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
218        configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"WHICH de.ugoe.cs.cpdp.wekaclassifier.WHICH\" />\n");
219    }
220   
221    public static void trainersLASER(StringBuilder configFile) {
222        configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
223        configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
224        configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
225        configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
226        configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"NET weka.classifiers.functions.RBFNetwork -CVPARAM W 0.1 10.0 3.0 L 2.0 18.0 3.0\" />\n");
227        configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
228    }
229       
230    public static void dataset(StringBuilder configFile, Dataset dataset) {
231        switch (dataset)
232        {
233            case MDP:
234                configFile.append(" <loader name=\"NasaARFFFolderLoader\" datalocation=\"benchmark/data/MDP\" relative=\"false\"/>\n");
235                break;
236            case MDP_EFFNORM:
237                configFile.append(" <loader name=\"NasaARFFFolderLoader\" datalocation=\"benchmark/data/MDP\" relative=\"false\"/>\n");
238                configFile.append(" <setwisepreprocessor name=\"NormalizeByEffort\" param=\"\"/>\n");
239                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"LOC_EXECUTABLE\"/>\n");
240                break;
241            case MDP_EFFLOGNORM:
242                configFile.append(" <loader name=\"NasaARFFFolderLoader\" datalocation=\"benchmark/data/MDP\" relative=\"false\"/>\n");
243                configFile.append(" <setwisepreprocessor name=\"NormalizeByLogEffort\" param=\"\"/>\n");
244                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"LOC_EXECUTABLE\"/>\n");
245                break;
246            case JURECZKO:
247                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\"/>\n");
248                break;
249            case JURECZKO_NUMERIC:
250                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\" classtype=\"numeric\"/>\n");
251                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
252                break;
253            case FILTERJURECZKO:
254                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\"/>\n");
255                configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
256                configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
257                break;
258            case SELECTEDJURECZKO:
259                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/SELECTEDJURECZKO\" relative=\"false\"/>\n");
260                break;
261            case JURECZKO_EFFNORM:
262                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\"/>\n");
263                configFile.append(" <setwisepreprocessor name=\"NormalizeByEffort\" param=\"\"/>\n");
264                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"loc\"/>\n");
265                break;
266            case JURECZKO_EFFLOGNORM:
267                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\"/>\n");
268                configFile.append(" <setwisepreprocessor name=\"NormalizeByLogEffort\" param=\"\"/>\n");
269                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"loc\"/>\n");
270                break;
271            case JURECZKO_EFFNORM_NUMERIC:
272                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\" classtype=\"numeric\"/>\n");
273                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
274                configFile.append(" <setwisepreprocessor name=\"NormalizeByEffort\" param=\"\"/>\n");
275                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"loc\"/>\n");
276                break;
277            case JURECZKO_EFFLOGNORM_NUMERIC:
278                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\" classtype=\"numeric\"/>\n");
279                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
280                configFile.append(" <setwisepreprocessor name=\"NormalizeByLogEffort\" param=\"\"/>\n");
281                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"loc\"/>\n");
282                break;
283            case JURECZKO_NUMERIC_DUPLICATE:
284                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\" classtype=\"numeric\"/>\n");
285                configFile.append(" <setwisepreprocessor name=\"CreateBugDuplicates\" param=\"\" />\n");
286                break;
287            case JURECZKO_NUMERIC_WEIGHTS:
288                configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\" classtype=\"numeric\"/>\n");
289                configFile.append(" <setwisepreprocessor name=\"WeightByNumBugs\" param=\"\" />\n");
290                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
291                break;
292            case AEEEM:
293                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM\" relative=\"false\"/>\n");
294                break;
295            case AEEEM_LDHH:
296                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHH\" relative=\"false\"/>\n");
297                break;
298            case AEEEM_LDHHWCHU:
299                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\"/>\n");
300                break;
301            case AEEEM_WCHU:
302                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_WCHU\" relative=\"false\"/>\n");
303                break;
304            case AEEEM_NUMERIC:
305                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM\" relative=\"false\" classtype=\"numeric\"/>\n");
306                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
307                break;
308            case AEEEM_LDHH_NUMERIC:
309                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHH\" relative=\"false\" classtype=\"numeric\"/>\n");
310                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
311                break;
312            case AEEEM_LDHHWCHU_NUMERIC:
313                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\" classtype=\"numeric\"/>\n");
314                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
315                break;
316            case AEEEM_WCHU_NUMERIC:
317                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_WCHU\" relative=\"false\" classtype=\"numeric\"/>\n");
318                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
319                break;
320            case AEEEM_LDHHWCHU_EFFNORM:
321                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\"/>\n");
322                configFile.append(" <setwisepreprocessor name=\"NormalizeByEffort\" param=\"\"/>\n");
323                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"numberOfLinesOfCode\"/>\n");
324                break;
325            case AEEEM_LDHHWCHU_EFFLOGNORM:
326                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\"/>\n");
327                configFile.append(" <setwisepreprocessor name=\"NormalizeByLogEffort\" param=\"\"/>\n");
328                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"numberOfLinesOfCode\"/>\n");
329                break;
330            case AEEEM_LDHHWCHU_EFFNORM_NUMERIC:
331                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\" classtype=\"numeric\"/>\n");
332                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
333                configFile.append(" <setwisepreprocessor name=\"NormalizeByEffort\" param=\"\"/>\n");
334                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"numberOfLinesOfCode\"/>\n");
335                break;
336            case AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC:
337                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\" classtype=\"numeric\"/>\n");
338                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
339                configFile.append(" <setwisepreprocessor name=\"NormalizeByLogEffort\" param=\"\"/>\n");
340                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"numberOfLinesOfCode\"/>\n");
341                break;
342            case AEEEM_LDHHWCHU_NUMERIC_DUPLICATE:
343                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\" classtype=\"numeric\"/>\n");
344                configFile.append(" <setwisepreprocessor name=\"CreateBugDuplicates\" param=\"\" />\n");
345                break;
346            case AEEEM_LDHHWCHU_NUMERIC_WEIGHTS:
347                configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\" classtype=\"numeric\"/>\n");
348                configFile.append(" <setwisepreprocessor name=\"WeightByNumBugs\" param=\"\" />\n");
349                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
350                break;
351            case RELINK:
352                configFile.append(" <loader name=\"RelinkFolderLoader\" datalocation=\"benchmark/data/RELINK\" relative=\"false\"/>\n");
353                break;
354            case RELINK_EFFNORM:
355                configFile.append(" <loader name=\"RelinkFolderLoader\" datalocation=\"benchmark/data/RELINK\" relative=\"false\"/>\n");
356                configFile.append(" <setwisepreprocessor name=\"NormalizeByEffort\" param=\"\"/>\n");
357                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"CountLineCodeExe\"/>\n");
358                break;
359            case RELINK_EFFLOGNORM:
360                configFile.append(" <loader name=\"RelinkFolderLoader\" datalocation=\"benchmark/data/RELINK\" relative=\"false\"/>\n");
361                configFile.append(" <setwisepreprocessor name=\"NormalizeByLogEffort\" param=\"\"/>\n");
362                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"CountLineCodeExe\"/>\n");
363                break;
364            case NETGENE:
365                configFile.append(" <loader name=\"NetgeneFolderLoader\" datalocation=\"benchmark/data/NETGENE\" relative=\"false\"/>\n");
366                break;
367            case NETGENE_NUMERIC:
368                configFile.append(" <loader name=\"NetgeneFolderLoader\" datalocation=\"benchmark/data/NETGENE\" relative=\"false\" classtype=\"numeric\"/>\n");
369                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
370                break;
371            case NETGENE_NUMERIC_DUPLICATE:
372                configFile.append(" <loader name=\"NetgeneFolderLoader\" datalocation=\"benchmark/data/NETGENE\" relative=\"false\" classtype=\"numeric\"/>\n");
373                configFile.append(" <setwisepreprocessor name=\"CreateBugDuplicates\" param=\"\" />\n");
374                break;
375            case NETGENE_NUMERIC_WEIGHTS:
376                configFile.append(" <loader name=\"NetgeneFolderLoader\" datalocation=\"benchmark/data/NETGENE\" relative=\"false\" classtype=\"numeric\"/>\n");
377                configFile.append(" <setwisepreprocessor name=\"WeightByNumBugs\" param=\"\" />\n");
378                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
379                break;
380            case SMARTSHARK_ALL:
381                configFile.append(" <loader name=\"JsonFolderLoader\" datalocation=\"exp-smartshark/data\" relative=\"false\"/>\n");
382                configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
383                configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
384                break;
385            case SMARTSHARK_AST:
386                configFile.append(" <loader name=\"JsonFolderLoader\" datalocation=\"exp-smartshark/data\" relative=\"false\"/>\n");
387                configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
388                configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
389                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"PDA LLOC PUA LOC McCC CLOC TNLM CLLC CCO TNPA NA AD NLPA NLS LDC NM TNPM LCOM5 WMC NOD RFC TNM NL NS NPA NOC CBO TNC TLLOC CI TNLG NLM NLG TNA DIT TCD TNLA NLE NG NLA TNLPA NOS CBOI NLPM LLDC CD TNG NPM CCL NOI NOP TLOC CLC CC DLOC NII TCLOC TNLS NOA TNLPM\"/>\n");
390                break;
391            case SMARTSHARK_SM:
392                configFile.append(" <loader name=\"JsonFolderLoader\" datalocation=\"exp-smartshark/data\" relative=\"false\"/>\n");
393                configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
394                configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
395                configFile.append(" <setwisepreprocessor name=\"AttributeRemoval\" param=\"ReferenceType LambdaExpression Member TypeArgument ThrowStatement ArraySelector Declaration ClassCreator ForStatement SwitchStatement InnerClassCreator Literal TypeParameter VoidClassReference WhileStatement EnhancedForControl This Statement ForControl BinaryOperation MethodReference SuperMemberReference EnumBody FormalParameter EnumConstantDeclaration Expression PackageDeclaration VariableDeclarator AssertStatement Documented node_count DoStatement InterfaceDeclaration ReturnStatement Cast ExplicitConstructorInvocation EnumDeclaration SynchronizedStatement AnnotationMethod SwitchStatementCase MemberReference TypeDeclaration ArrayInitializer CatchClauseParameter CatchClause VariableDeclaration TryStatement Annotation TryResource MethodInvocation BasicType ElementArrayValue InferredFormalParameter IfStatement SuperConstructorInvocation BreakStatement AnnotationDeclaration FieldDeclaration Assignment ContinueStatement Import Primary BlockStatement ClassDeclaration TernaryExpression ClassReference CompilationUnit ConstantDeclaration LocalVariableDeclaration MethodDeclaration ConstructorDeclaration ElementValuePair ArrayCreator Invocation StatementExpression SuperMethodInvocation\"/>\n");
396                break;
397            case SMARTSHARK_ALL_NUMERIC:
398                configFile.append(" <loader name=\"JsonFolderLoader\" datalocation=\"exp-smartshark/data\" relative=\"false\" classtype=\"numeric\"/>\n");
399                configFile.append(" <setwisepreprocessor name=\"MakeClassBinary\" param=\"\" />\n");
400                configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
401                configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
402                break;
403            default:
404                throw new InvalidParameterException("Unknown data set: " + dataset.toString());
405        }
406        configFile.append(" <versionfilter name=\"MinClassNumberFilter\" param=\"5\" />\n");
407        configFile.append(" <resultspath path=\"benchmark/results-csv\"/>\n");
408    }
409   
410    public static String ALL(Dataset dataset) {
411        StringBuilder configFile = new StringBuilder();
412        preamble(configFile);
413        dataset(configFile, dataset);
414        trainers(configFile);
415       
416        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
417       
418        postamble(configFile);
419        return configFile.toString();
420    }
421   
422    public static String CV(Dataset dataset) {
423        StringBuilder configFile = new StringBuilder();
424        preamble(configFile);
425        dataset(configFile, dataset);
426        trainers(configFile);
427       
428        configFile.append(" <eval name=\"CVWekaEvaluation\" param=\"\" />\n");
429        configFile.append(" <executionStrategy name=\"CrossValidationExperiment\" param=\"\" />\n");
430        configFile.append(" <repetitions number=\"10\" />\n");
431       
432        postamble(configFile);
433        return configFile.toString();
434    }
435   
436    public static String Random(Dataset dataset) {
437        StringBuilder configFile = new StringBuilder();
438        preamble(configFile);
439        dataset(configFile, dataset);
440       
441        configFile.append(" <trainer name=\"WekaTraining\" param=\"RANDOM de.ugoe.cs.cpdp.wekaclassifier.RandomClass\" />\n");
442        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
443        configFile.append(" <repetitions number=\"10\" />\n");
444       
445        postamble(configFile);
446        return configFile.toString();
447    }
448   
449    public static String Trivial(Dataset dataset) {
450        StringBuilder configFile = new StringBuilder();
451        preamble(configFile);
452        dataset(configFile, dataset);
453       
454        configFile.append(" <trainer name=\"WekaTraining\" param=\"FIX de.ugoe.cs.cpdp.wekaclassifier.FixClass -C 1\" />\n");
455        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
456       
457        postamble(configFile);
458        return configFile.toString();
459    }
460   
461    public static String Koshgoftaar08(Dataset dataset) {
462        StringBuilder configFile = new StringBuilder();
463        preamble(configFile);
464        dataset(configFile, dataset);
465        trainersBagging(configFile);
466       
467        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
468       
469        postamble(configFile);
470        return configFile.toString();
471    }
472   
473    public static String Watanabe08(Dataset dataset) {
474        StringBuilder configFile = new StringBuilder();
475        preamble(configFile);
476        dataset(configFile, dataset);
477        trainers(configFile);
478       
479        configFile.append(" <setwisepreprocessor name=\"AverageStandardization\" param=\"\" />\n");       
480        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
481       
482        postamble(configFile);
483        return configFile.toString();
484    }
485   
486    public static String Turhan09(Dataset dataset) {
487        StringBuilder configFile = new StringBuilder();
488        preamble(configFile);
489        dataset(configFile, dataset);
490        trainers(configFile);
491       
492        configFile.append(" <preprocessor name=\"LogarithmTransform\" param=\"\" />\n");
493        configFile.append(" <pointwiseselector name=\"TurhanFilter\" param=\"10\" />\n");
494        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
495       
496        postamble(configFile);
497        return configFile.toString();
498    }
499   
500    public static String Zimmermann09(Dataset dataset) {
501        StringBuilder configFile = new StringBuilder();
502        preamble(configFile);
503        dataset(configFile, dataset);
504        trainers(configFile);
505       
506        configFile.append(" <setwiseselector name=\"DecisionTreeSelection\" param=\"max median stddev\" />\n");
507        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
508       
509        postamble(configFile);
510        return configFile.toString();
511    }
512   
513    public static String CamargoCruz09(Dataset dataset) {
514        StringBuilder configFile = new StringBuilder();
515        preamble(configFile);
516        dataset(configFile, dataset);
517        trainers(configFile);
518       
519        configFile.append(" <preprocessor name=\"LogarithmTransform\" param=\"\" />\n");
520        configFile.append(" <preprocessor name=\"MedianAsReference\" param=\"10\" />\n");
521        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
522       
523        postamble(configFile);
524        return configFile.toString();
525    }
526   
527    public static String Liu10(Dataset dataset) {
528        StringBuilder configFile = new StringBuilder();
529        preamble(configFile);
530        dataset(configFile, dataset);
531       
532        configFile.append(" <setwisetrainer name=\"GP\" param=\"numberRuns:1,errorType2Weight:15\" />");
533        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
534        configFile.append(" <repetitions number=\"10\" />\n");
535       
536        postamble(configFile);
537        return configFile.toString();
538    }
539   
540    public static String Menzies11(Dataset dataset) {
541        StringBuilder configFile = new StringBuilder();
542        preamble(configFile);
543        dataset(configFile, dataset);
544       
545        trainersLocalWhere(configFile);       
546        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
547        configFile.append(" <repetitions number=\"10\" />\n");
548       
549        postamble(configFile);
550        return configFile.toString();
551    }
552   
553    public static String Ma12(Dataset dataset) {
554        StringBuilder configFile = new StringBuilder();
555        preamble(configFile);
556        dataset(configFile, dataset);
557        trainers(configFile);
558       
559        configFile.append(" <preprocessor name=\"DataGravitation\" param=\"\" />\n");
560        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
561       
562        postamble(configFile);
563        return configFile.toString();
564    }
565   
566    public static String Peters12(Dataset dataset) {
567        StringBuilder configFile = new StringBuilder();
568        preamble(configFile);
569        dataset(configFile, dataset);
570        trainers(configFile);
571       
572        configFile.append(" <preprocessor name=\"MORPH\" param=\"\" />\n");
573        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
574        configFile.append(" <repetitions number=\"10\" />\n");
575       
576        postamble(configFile);
577        return configFile.toString();
578    }
579   
580    public static String Uchigaki12(Dataset dataset) {
581        StringBuilder configFile = new StringBuilder();
582        preamble(configFile);
583        dataset(configFile, dataset);
584       
585        configFile.append(" <preprocessor name=\"ZScoreNormalization\" param=\"\" />\n");
586        configFile.append(" <trainer name=\"WekaTraining\" param=\"LE de.ugoe.cs.cpdp.wekaclassifier.LogisticEnsemble\" />\n");
587        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
588       
589        postamble(configFile);
590        return configFile.toString();
591    }
592   
593    public static String Canfora13(Dataset dataset) {
594        StringBuilder configFile = new StringBuilder();
595        preamble(configFile);
596        dataset(configFile, dataset);
597       
598        configFile.append(" <preprocessor name=\"ZScoreNormalization\" param=\"\" />\n");
599        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP100 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 1.0\" />\n");
600        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP90 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.9\" />\n");
601        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP80 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.8\" />\n");
602        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP70 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.7\" />\n");
603        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP60 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.6\" />\n");
604        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP50 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.5\" />\n");
605        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP40 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.4\" />\n");
606        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP30 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.3\" />\n");
607        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP20 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.2\" />\n");
608        configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP10 de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.1\" />\n");
609        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
610        configFile.append(" <repetitions number=\"10\" />\n");
611       
612        postamble(configFile);
613        return configFile.toString();
614    }
615   
616    public static String Peters13(Dataset dataset) {
617        StringBuilder configFile = new StringBuilder();
618        preamble(configFile);
619        dataset(configFile, dataset);
620        trainers(configFile);
621       
622        configFile.append(" <preprocessor name=\"MORPH\" param=\"\" />\n");
623        configFile.append(" <pointwiseselector name=\"CLIFF\" param=\"0.40\" />");
624        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
625        configFile.append(" <repetitions number=\"10\" />\n");
626       
627        postamble(configFile);
628        return configFile.toString();
629    }
630   
631    public static String Herbold13(Dataset dataset) {
632        StringBuilder configFile = new StringBuilder();
633        preamble(configFile);
634        dataset(configFile, dataset);
635        trainers(configFile);
636       
637        int numNeighbors;
638        switch (dataset)
639        {
640            case AEEEM:
641            case AEEEM_LDHH:
642            case AEEEM_LDHHWCHU:
643            case AEEEM_WCHU:
644            case AEEEM_NUMERIC:
645            case AEEEM_LDHH_NUMERIC:
646            case AEEEM_LDHHWCHU_NUMERIC:
647            case AEEEM_WCHU_NUMERIC:
648            case AEEEM_LDHHWCHU_EFFNORM:
649            case AEEEM_LDHHWCHU_EFFLOGNORM:
650            case AEEEM_LDHHWCHU_EFFNORM_NUMERIC:
651            case AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC:
652            case AEEEM_LDHHWCHU_NUMERIC_DUPLICATE:
653            case AEEEM_LDHHWCHU_NUMERIC_WEIGHTS:
654                numNeighbors = 2;
655                break;
656            case MDP:
657            case MDP_EFFNORM:
658            case MDP_EFFLOGNORM:
659                numNeighbors = 5;
660                break;
661            case JURECZKO:
662            case JURECZKO_NUMERIC:
663            case JURECZKO_EFFNORM:
664            case JURECZKO_EFFLOGNORM:
665            case JURECZKO_EFFNORM_NUMERIC:
666            case JURECZKO_EFFLOGNORM_NUMERIC:
667            case JURECZKO_NUMERIC_DUPLICATE:
668            case JURECZKO_NUMERIC_WEIGHTS:
669                numNeighbors = 30;
670                break;
671            case FILTERJURECZKO:
672                numNeighbors = 20;
673                break;
674            case RELINK:
675            case RELINK_EFFNORM:
676            case RELINK_EFFLOGNORM:
677                numNeighbors = 1;
678                break;
679            case NETGENE:
680            case NETGENE_NUMERIC:
681            case NETGENE_NUMERIC_DUPLICATE:
682            case NETGENE_NUMERIC_WEIGHTS:
683                numNeighbors = 1;
684                break;
685            case SELECTEDJURECZKO:
686                numNeighbors = 4;
687                break;
688            case SMARTSHARK_ALL:
689            case SMARTSHARK_AST:
690            case SMARTSHARK_SM:
691            case SMARTSHARK_ALL_NUMERIC:
692                // TODO check num neighbors
693            default:
694                numNeighbors = 10;
695                break;
696        }
697       
698        configFile.append(" <setwisepreprocessor name=\"Normalization\" param=\"\" />\n");
699        configFile.append(" <setwiseselector name=\"SetWiseKNNSelection\" param=\""+ numNeighbors +"\" />\n");
700        configFile.append(" <postprocessor name=\"BiasedWeights\" param=\"0.5\" />\n");
701        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
702       
703        postamble(configFile);
704        return configFile.toString();
705    }
706   
707    public static String ZHe13(Dataset dataset) {
708        StringBuilder configFile = new StringBuilder();
709        preamble(configFile);
710        dataset(configFile, dataset);
711        trainersBagging(configFile);
712       
713        int numNeighbors;
714        switch (dataset)
715        {
716            case AEEEM:
717            case AEEEM_LDHH:
718            case AEEEM_LDHHWCHU:
719            case AEEEM_WCHU:
720            case AEEEM_NUMERIC:
721            case AEEEM_LDHH_NUMERIC:
722            case AEEEM_LDHHWCHU_NUMERIC:
723            case AEEEM_WCHU_NUMERIC:
724            case AEEEM_LDHHWCHU_EFFNORM:
725            case AEEEM_LDHHWCHU_EFFLOGNORM:
726            case AEEEM_LDHHWCHU_EFFNORM_NUMERIC:
727            case AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC:
728            case AEEEM_LDHHWCHU_NUMERIC_DUPLICATE:
729            case AEEEM_LDHHWCHU_NUMERIC_WEIGHTS:
730                numNeighbors = 1;
731                break;
732            case MDP:
733            case MDP_EFFNORM:
734            case MDP_EFFLOGNORM:
735                numNeighbors = 4;
736                break;
737            case JURECZKO:
738            case JURECZKO_NUMERIC:
739            case JURECZKO_NUMERIC_DUPLICATE:
740            case JURECZKO_NUMERIC_WEIGHTS:
741            case JURECZKO_EFFNORM:
742            case JURECZKO_EFFLOGNORM:
743            case JURECZKO_EFFNORM_NUMERIC:
744            case JURECZKO_EFFLOGNORM_NUMERIC:
745                numNeighbors = 16;
746                break;
747            case FILTERJURECZKO:
748                numNeighbors = 13;
749                break;
750            case RELINK:
751            case RELINK_EFFNORM:
752            case RELINK_EFFLOGNORM:
753                numNeighbors = 1;
754                break;
755            case NETGENE:
756            case NETGENE_NUMERIC:
757            case NETGENE_NUMERIC_DUPLICATE:
758            case NETGENE_NUMERIC_WEIGHTS:
759                numNeighbors = 1;
760                break;
761            case SELECTEDJURECZKO:
762                numNeighbors = 4;
763                break;
764            case SMARTSHARK_ALL:
765            case SMARTSHARK_AST:
766            case SMARTSHARK_SM:
767            case SMARTSHARK_ALL_NUMERIC:
768                // TODO check num neighbors
769            default:
770                numNeighbors = 10;
771                break;
772        }
773       
774        configFile.append(" <setwisepreprocessor name=\"Normalization\" param=\"\" />\n");
775        configFile.append(" <setwiseselector name=\"SeparatabilitySelection\" param=\"" + numNeighbors + "\" />\n");
776        configFile.append(" <setwisepostprocessor name=\"Undersampling\" param=\"\" />\n");
777        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
778        configFile.append(" <repetitions number=\"10\" />\n");
779       
780        postamble(configFile);
781        return configFile.toString();
782    }
783   
784    public static String Nam13(Dataset dataset) {
785        StringBuilder configFile = new StringBuilder();
786        preamble(configFile);
787        dataset(configFile, dataset);
788        trainers(configFile);
789       
790        configFile.append(" <preprocessor name=\"TCAPlusNormalization\" param=\"\" />\n");
791        configFile.append(" <postprocessor name=\"TransferComponentAnalysis\" param=\"\" />\n");
792        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
793       
794        postamble(configFile);
795        return configFile.toString();
796    }
797   
798    public static String Panichella14(Dataset dataset) {
799        StringBuilder configFile = new StringBuilder();
800        preamble(configFile);
801        dataset(configFile, dataset);
802       
803        configFile.append(" <trainer name=\"WekaTraining\" param=\"CODEP-LR de.ugoe.cs.cpdp.wekaclassifier.LogisticCODEP\" />\n");
804        configFile.append(" <trainer name=\"WekaTraining\" param=\"CODEP-BN de.ugoe.cs.cpdp.wekaclassifier.BayesNetCODEP\" />\n");
805        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
806       
807        postamble(configFile);
808        return configFile.toString();
809    }
810   
811    public static String Ryu14(Dataset dataset) {
812        StringBuilder configFile = new StringBuilder();
813        preamble(configFile);
814        dataset(configFile, dataset);
815       
816        configFile.append(" <preprocessor name=\"ZScoreNormalization\" param=\"\" />\n");
817        configFile.append(" <testawaretrainer name=\"WekaTestAwareTraining\" param=\"VCBSVM de.ugoe.cs.cpdp.wekaclassifier.VCBSVM -L 0.1 -B 10\" />\n");
818        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
819        configFile.append(" <repetitions number=\"10\" />\n");
820       
821        postamble(configFile);
822        return configFile.toString();
823    }
824   
825    public static String PHe15(Dataset dataset) {
826        StringBuilder configFile = new StringBuilder();
827        preamble(configFile);
828        dataset(configFile, dataset);
829        trainers(configFile);
830       
831        configFile.append(" <setwisepreprocessor name=\"LogarithmTransform\" param=\"\" />\n");
832        configFile.append(" <setwisepreprocessor name=\"TopMetricFilter\" param=\"\" />\n");
833        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
834       
835        postamble(configFile);
836        return configFile.toString();
837    }
838   
839    public static String Peters15(Dataset dataset) {
840        StringBuilder configFile = new StringBuilder();
841        preamble(configFile);
842        dataset(configFile, dataset);
843        trainers(configFile);
844       
845        configFile.append(" <setwisepreprocessor name=\"LogarithmTransform\" param=\"\" />\n");
846        configFile.append(" <setwiseselector name=\"LACE2\" param=\"0.4\" />\n");
847        configFile.append(" <pointwiseselector name=\"TurhanFilter\" param=\"1\" />\n");
848        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
849        configFile.append(" <repetitions number=\"10\" />\n");
850       
851        postamble(configFile);
852        return configFile.toString();
853    }
854   
855    public static String Kawata15(Dataset dataset) {
856        StringBuilder configFile = new StringBuilder();
857        preamble(configFile);
858        dataset(configFile, dataset);
859        trainers(configFile);
860       
861        configFile.append(" <pointwiseselector name=\"DBSCANFilter\" param=\"\" />\n");
862        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
863       
864        postamble(configFile);
865        return configFile.toString();
866    }
867   
868    public static String YZhang15(Dataset dataset) {
869        StringBuilder configFile = new StringBuilder();
870        preamble(configFile);
871        dataset(configFile, dataset);
872       
873        configFile.append(" <trainer name=\"WekaTraining\" param=\"AVGVOTE weka.classifiers.meta.Vote -S 1 -B &quot;weka.classifiers.trees.ADTree&quot; -B &quot;de.ugoe.cs.cpdp.wekaclassifier.DecisionTableWrapper&quot; -B &quot;de.ugoe.cs.cpdp.wekaclassifier.BayesNetWrapper&quot; -B &quot;weka.classifiers.functions.MultilayerPerceptron&quot; -B &quot;weka.classifiers.functions.RBFNetwork&quot; -R AVG\" />\n");
874        configFile.append(" <trainer name=\"WekaTraining\" param=\"MAXVOTE weka.classifiers.meta.Vote -S 1 -B &quot;weka.classifiers.trees.ADTree&quot; -B &quot;de.ugoe.cs.cpdp.wekaclassifier.DecisionTableWrapper&quot; -B &quot;de.ugoe.cs.cpdp.wekaclassifier.BayesNetWrapper&quot; -B &quot;weka.classifiers.functions.MultilayerPerceptron&quot; -B &quot;weka.classifiers.functions.RBFNetwork&quot; -R MAX\" />\n");
875        configFile.append(" <trainer name=\"WekaTraining\" param=\"BAG-DT weka.classifiers.meta.Bagging -P 100 -S 1 -I 10 -W weka.classifiers.trees.J48\" />\n");
876        configFile.append(" <trainer name=\"WekaTraining\" param=\"BAG-NB weka.classifiers.meta.Bagging -P 100 -S 1 -I 10 -W weka.classifiers.bayes.NaiveBayes\" />\n");
877        configFile.append(" <trainer name=\"WekaTraining\" param=\"BOOST-DT weka.classifiers.meta.AdaBoostM1 -P 100 -S 1 -I 10 -W weka.classifiers.trees.J48\" />\n");
878        configFile.append(" <trainer name=\"WekaTraining\" param=\"BOOST-NB weka.classifiers.meta.AdaBoostM1 -P 100 -S 1 -I 10 -W weka.classifiers.bayes.NaiveBayes\" />\n");
879        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
880       
881        postamble(configFile);
882        return configFile.toString();
883    }
884   
885    public static String Amasaki15(Dataset dataset) {
886        StringBuilder configFile = new StringBuilder();
887        preamble(configFile);
888        dataset(configFile, dataset);
889        trainers(configFile);
890       
891        configFile.append(" <preprocessor name=\"LogarithmTransform\" param=\"\" />\n");
892        configFile.append(" <preprocessor name=\"SynonymAttributePruning\" param=\"\" />\n");
893        configFile.append(" <pointwiseselector name=\"SynonymOutlierRemoval\" param=\"\" />");
894        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
895       
896        postamble(configFile);
897        return configFile.toString();
898    }
899   
900    public static String Ryu15(Dataset dataset) {
901        StringBuilder configFile = new StringBuilder();
902        preamble(configFile);
903        dataset(configFile, dataset);
904        trainersLASER(configFile);
905       
906        configFile.append(" <pointwiseselector name=\"MahalanobisOutlierRemoval\" param=\"\" />\n");
907        configFile.append(" <pointwiseselector name=\"NeighborhoodFilter\" param=\"\" />\n");
908        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
909       
910        postamble(configFile);
911        return configFile.toString();
912    }
913   
914    public static String Nam15(Dataset dataset) {
915        StringBuilder configFile = new StringBuilder();
916        preamble(configFile);
917        dataset(configFile, dataset);
918        trainers(configFile);
919       
920        configFile.append(" <preprocessor name=\"CLAMIProcessor\" param=\"\" />\n");
921        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
922       
923        postamble(configFile);
924        return configFile.toString();
925    }
926   
927    public static String Tantithamthavorn16(Dataset dataset) {
928        StringBuilder configFile = new StringBuilder();
929        preamble(configFile);
930        dataset(configFile, dataset);
931       
932        configFile.append(" <trainer name=\"WekaTraining\" param=\"NBCARET de.ugoe.cs.cpdp.wekaclassifier.NaiveBayesCaret\" />\n");
933        configFile.append(" <trainer name=\"WekaTraining\" param=\"RFCARET weka.classifiers.trees.RandomForest -CVPARAM I 10 50 10\" />\n");
934        configFile.append(" <trainer name=\"WekaTraining\" param=\"SVMCARET de.ugoe.cs.cpdp.wekaclassifier.SMOCaret\" />\n");
935        //configFile.append(" <trainer name=\"WekaTraining\" param=\"C50CARET de.ugoe.cs.cpdp.wekaclassifier.C50Caret\" />\n");
936        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
937        configFile.append(" <repetitions number=\"10\" />\n");
938       
939        postamble(configFile);
940        return configFile.toString();
941    }
942   
943    public static String Hosseini16(Dataset dataset) {
944        StringBuilder configFile = new StringBuilder();
945        preamble(configFile);
946        dataset(configFile, dataset);
947       
948        configFile.append(" <testawaretrainer name=\"WekaTestAwareTraining\" param=\"SBS de.ugoe.cs.cpdp.wekaclassifier.SearchBasedSelectionClassifier\" />\n");
949        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
950        configFile.append(" <repetitions number=\"10\" />\n");
951       
952        postamble(configFile);
953        return configFile.toString();
954    }
955   
956    public static String FZhang16(Dataset dataset) {
957        StringBuilder configFile = new StringBuilder();
958        preamble(configFile);
959        dataset(configFile, dataset);
960
961        configFile.append(" <preprocessor name=\"ZScoreNormalization\" param=\"\" />\n");
962        configFile.append(" <setwiseselector name=\"TestAsTraining\" param=\"\" />\n");
963        configFile.append(" <trainer name=\"WekaTraining\" param=\"SC de.ugoe.cs.cpdp.wekaclassifier.SpectralClusteringClassifier\" />\n");
964        configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
965       
966        postamble(configFile);
967        return configFile.toString();
968    }
969}
Note: See TracBrowser for help on using the repository browser.