1 | package de.ugoe.cs.crosspare;
|
---|
2 |
|
---|
3 | import java.io.FileWriter;
|
---|
4 | import java.io.IOException;
|
---|
5 | import java.lang.reflect.InvocationTargetException;
|
---|
6 | import java.security.InvalidParameterException;
|
---|
7 |
|
---|
8 | public class ConfigurationBuilder {
|
---|
9 |
|
---|
10 | private static enum Dataset {MDP, JURECZKO, FILTERJURECZKO, AEEEM, RELINK, NETGENE, SELECTEDJURECZKO, AEEEM_LDHH, AEEEM_WCHU, AEEEM_LDHHWCHU, SMARTSHARK_ALL, SMARTSHARK_AST, SMARTSHARK_SM}
|
---|
11 |
|
---|
12 | private static final String storageFolder = "config/";
|
---|
13 |
|
---|
14 | public static void main(String[] args) {
|
---|
15 | for( Dataset dataset : Dataset.values() ) {
|
---|
16 | // baselines
|
---|
17 | writeFile("ALL", dataset);
|
---|
18 | writeFile("CV", dataset);
|
---|
19 | writeFile("Random", dataset);
|
---|
20 | writeFile("Trivial", dataset);
|
---|
21 | // publications
|
---|
22 | writeFile("Koshgoftaar08", dataset);
|
---|
23 | writeFile("Watanabe08", dataset);
|
---|
24 | writeFile("Turhan09", dataset);
|
---|
25 | writeFile("Zimmermann09", dataset);
|
---|
26 | writeFile("CamargoCruz09", dataset);
|
---|
27 | writeFile("Liu10", dataset);
|
---|
28 | writeFile("Menzies11", dataset);
|
---|
29 | writeFile("Ma12", dataset);
|
---|
30 | writeFile("Peters12", dataset);
|
---|
31 | writeFile("Uchigaki12", dataset);
|
---|
32 | writeFile("Canfora13", dataset);
|
---|
33 | writeFile("Peters13", dataset);
|
---|
34 | writeFile("Herbold13", dataset);
|
---|
35 | writeFile("ZHe13", dataset);
|
---|
36 | writeFile("Nam13", dataset);
|
---|
37 | writeFile("Panichella14", dataset);
|
---|
38 | writeFile("Ryu14", dataset);
|
---|
39 | writeFile("PHe15", dataset);
|
---|
40 | writeFile("Peters15", dataset);
|
---|
41 | writeFile("Kawata15", dataset);
|
---|
42 | writeFile("YZhang15", dataset);
|
---|
43 | writeFile("Amasaki15", dataset);
|
---|
44 | writeFile("Ryu15", dataset);
|
---|
45 | writeFile("Nam15", dataset);
|
---|
46 | }
|
---|
47 | }
|
---|
48 |
|
---|
49 | public static void writeFile(String approach, Dataset dataset) {
|
---|
50 | try(FileWriter writer = new FileWriter(storageFolder + dataset.toString() + "-" + approach + ".xml");) {
|
---|
51 | writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset));
|
---|
52 | writer.flush();
|
---|
53 | }
|
---|
54 | catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
|
---|
55 | e.printStackTrace();
|
---|
56 | }
|
---|
57 | }
|
---|
58 |
|
---|
59 | public static void preamble(StringBuilder configFile) {
|
---|
60 | configFile.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
|
---|
61 | configFile.append("<config xmlns=\"experimentconfig\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"experimentconfig experimentconfig.xsd\">\n");
|
---|
62 | }
|
---|
63 |
|
---|
64 | public static void postamble(StringBuilder configFile) {
|
---|
65 | configFile.append(" <storage name=\"MySQLResultStorage\" param=\"\" />\n");
|
---|
66 | configFile.append("</config>");
|
---|
67 | }
|
---|
68 |
|
---|
69 | public static void trainers(StringBuilder configFile) {
|
---|
70 | configFile.append(" <trainer name=\"WekaTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
|
---|
71 | configFile.append(" <trainer name=\"WekaTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
|
---|
72 | configFile.append(" <trainer name=\"WekaTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
|
---|
73 | configFile.append(" <trainer name=\"WekaTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
|
---|
74 | 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");
|
---|
75 | configFile.append(" <trainer name=\"WekaTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
|
---|
76 | }
|
---|
77 |
|
---|
78 | public static void trainersBagging(StringBuilder configFile) {
|
---|
79 | configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
|
---|
80 | configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
|
---|
81 | configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
|
---|
82 | configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
|
---|
83 | 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");
|
---|
84 | configFile.append(" <setwisetrainer name=\"WekaBaggingTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
|
---|
85 | }
|
---|
86 |
|
---|
87 | public static void trainersLocalWhere(StringBuilder configFile) {
|
---|
88 | configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
|
---|
89 | configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
|
---|
90 | configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
|
---|
91 | configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
|
---|
92 | 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");
|
---|
93 | configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
|
---|
94 | configFile.append(" <trainer name=\"WekaLocalFQTraining\" param=\"WHICH de.ugoe.cs.cpdp.wekaclassifier.WHICH\" />\n");
|
---|
95 | }
|
---|
96 |
|
---|
97 | public static void trainersLASER(StringBuilder configFile) {
|
---|
98 | configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"NB weka.classifiers.bayes.NaiveBayes\" />\n");
|
---|
99 | configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"RF weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5\" />\n");
|
---|
100 | configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"DT weka.classifiers.trees.J48 -CVPARAM C 0.1 0.3 5\" />\n");
|
---|
101 | configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"LR weka.classifiers.functions.Logistic\" />\n");
|
---|
102 | 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");
|
---|
103 | configFile.append(" <trainer name=\"WekaLASERTraining\" param=\"SVM weka.classifiers.functions.SMO -K weka.classifiers.functions.supportVector.RBFKernel\" />\n");
|
---|
104 | }
|
---|
105 |
|
---|
106 | public static void dataset(StringBuilder configFile, Dataset dataset) {
|
---|
107 | switch (dataset)
|
---|
108 | {
|
---|
109 | case MDP:
|
---|
110 | configFile.append(" <loader name=\"NasaARFFFolderLoader\" datalocation=\"benchmark/data/MDP\" relative=\"false\"/>\n");
|
---|
111 | break;
|
---|
112 | case JURECZKO:
|
---|
113 | configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\"/>\n");
|
---|
114 | break;
|
---|
115 | case FILTERJURECZKO:
|
---|
116 | configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/JURECZKO\" relative=\"false\"/>\n");
|
---|
117 | configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
|
---|
118 | configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
|
---|
119 | break;
|
---|
120 | case AEEEM:
|
---|
121 | configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM\" relative=\"false\"/>\n");
|
---|
122 | break;
|
---|
123 | case AEEEM_LDHH:
|
---|
124 | configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHH\" relative=\"false\"/>\n");
|
---|
125 | break;
|
---|
126 | case AEEEM_LDHHWCHU:
|
---|
127 | configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_LDHHWCHU\" relative=\"false\"/>\n");
|
---|
128 | break;
|
---|
129 | case AEEEM_WCHU:
|
---|
130 | configFile.append(" <loader name=\"ARFFFolderLoader\" datalocation=\"benchmark/data/AEEEM_WCHU\" relative=\"false\"/>\n");
|
---|
131 | break;
|
---|
132 | case RELINK:
|
---|
133 | configFile.append(" <loader name=\"RelinkFolderLoader\" datalocation=\"benchmark/data/RELINK\" relative=\"false\"/>\n");
|
---|
134 | break;
|
---|
135 | case NETGENE:
|
---|
136 | configFile.append(" <loader name=\"NetgeneFolderLoader\" datalocation=\"benchmark/data/NETGENE\" relative=\"false\"/>\n");
|
---|
137 | break;
|
---|
138 | case SELECTEDJURECZKO:
|
---|
139 | configFile.append(" <loader name=\"CSVFolderLoader\" datalocation=\"benchmark/data/SELECTEDJURECZKO\" relative=\"false\"/>\n");
|
---|
140 | break;
|
---|
141 | case SMARTSHARK_ALL:
|
---|
142 | configFile.append(" <loader name=\"JsonFolderLoader\" datalocation=\"exp-smartshark/data\" relative=\"false\"/>\n");
|
---|
143 | configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
|
---|
144 | configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
|
---|
145 | break;
|
---|
146 | case SMARTSHARK_AST:
|
---|
147 | configFile.append(" <loader name=\"JsonFolderLoader\" datalocation=\"exp-smartshark/data\" relative=\"false\"/>\n");
|
---|
148 | configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
|
---|
149 | configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
|
---|
150 | 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");
|
---|
151 | break;
|
---|
152 | case SMARTSHARK_SM:
|
---|
153 | configFile.append(" <loader name=\"JsonFolderLoader\" datalocation=\"exp-smartshark/data\" relative=\"false\"/>\n");
|
---|
154 | configFile.append(" <versionfilter name=\"MinInstanceNumberFilter\" param=\"100\" />\n");
|
---|
155 | configFile.append(" <versionfilter name=\"UnbalancedFilter\" param=\"0.05\" />\n");
|
---|
156 | 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");
|
---|
157 | break;
|
---|
158 | default:
|
---|
159 | throw new InvalidParameterException("Unknown data set: " + dataset.toString());
|
---|
160 | }
|
---|
161 | configFile.append(" <versionfilter name=\"MinClassNumberFilter\" param=\"5\" />\n");
|
---|
162 | configFile.append(" <resultspath path=\"benchmark/results-csv\"/>\n");
|
---|
163 | }
|
---|
164 |
|
---|
165 | public static String ALL(Dataset dataset) {
|
---|
166 | StringBuilder configFile = new StringBuilder();
|
---|
167 | preamble(configFile);
|
---|
168 | dataset(configFile, dataset);
|
---|
169 | trainers(configFile);
|
---|
170 |
|
---|
171 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
172 |
|
---|
173 | postamble(configFile);
|
---|
174 | return configFile.toString();
|
---|
175 | }
|
---|
176 |
|
---|
177 | public static String CV(Dataset dataset) {
|
---|
178 | StringBuilder configFile = new StringBuilder();
|
---|
179 | preamble(configFile);
|
---|
180 | dataset(configFile, dataset);
|
---|
181 | trainers(configFile);
|
---|
182 |
|
---|
183 | configFile.append(" <eval name=\"CVWekaEvaluation\" param=\"\" />\n");
|
---|
184 |
|
---|
185 | postamble(configFile);
|
---|
186 | return configFile.toString();
|
---|
187 | }
|
---|
188 |
|
---|
189 | public static String Random(Dataset dataset) {
|
---|
190 | StringBuilder configFile = new StringBuilder();
|
---|
191 | preamble(configFile);
|
---|
192 | dataset(configFile, dataset);
|
---|
193 |
|
---|
194 | configFile.append(" <trainer name=\"WekaTraining\" param=\"RANDOM de.ugoe.cs.cpdp.wekaclassifier.RandomClass\" />\n");
|
---|
195 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
196 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
197 |
|
---|
198 | postamble(configFile);
|
---|
199 | return configFile.toString();
|
---|
200 | }
|
---|
201 |
|
---|
202 | public static String Trivial(Dataset dataset) {
|
---|
203 | StringBuilder configFile = new StringBuilder();
|
---|
204 | preamble(configFile);
|
---|
205 | dataset(configFile, dataset);
|
---|
206 |
|
---|
207 | configFile.append(" <trainer name=\"WekaTraining\" param=\"FIX de.ugoe.cs.cpdp.wekaclassifier.FixClass -C 1\" />\n");
|
---|
208 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
209 |
|
---|
210 | postamble(configFile);
|
---|
211 | return configFile.toString();
|
---|
212 | }
|
---|
213 |
|
---|
214 | public static String Koshgoftaar08(Dataset dataset) {
|
---|
215 | StringBuilder configFile = new StringBuilder();
|
---|
216 | preamble(configFile);
|
---|
217 | dataset(configFile, dataset);
|
---|
218 | trainersBagging(configFile);
|
---|
219 |
|
---|
220 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
221 |
|
---|
222 | postamble(configFile);
|
---|
223 | return configFile.toString();
|
---|
224 | }
|
---|
225 |
|
---|
226 | public static String Watanabe08(Dataset dataset) {
|
---|
227 | StringBuilder configFile = new StringBuilder();
|
---|
228 | preamble(configFile);
|
---|
229 | dataset(configFile, dataset);
|
---|
230 | trainers(configFile);
|
---|
231 |
|
---|
232 | configFile.append(" <setwisepreprocessor name=\"AverageStandardization\" param=\"\" />\n");
|
---|
233 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
234 |
|
---|
235 | postamble(configFile);
|
---|
236 | return configFile.toString();
|
---|
237 | }
|
---|
238 |
|
---|
239 | public static String Turhan09(Dataset dataset) {
|
---|
240 | StringBuilder configFile = new StringBuilder();
|
---|
241 | preamble(configFile);
|
---|
242 | dataset(configFile, dataset);
|
---|
243 | trainers(configFile);
|
---|
244 |
|
---|
245 | configFile.append(" <preprocessor name=\"LogarithmTransform\" param=\"\" />\n");
|
---|
246 | configFile.append(" <pointwiseselector name=\"TurhanFilter\" param=\"10\" />\n");
|
---|
247 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
248 |
|
---|
249 | postamble(configFile);
|
---|
250 | return configFile.toString();
|
---|
251 | }
|
---|
252 |
|
---|
253 | public static String Zimmermann09(Dataset dataset) {
|
---|
254 | StringBuilder configFile = new StringBuilder();
|
---|
255 | preamble(configFile);
|
---|
256 | dataset(configFile, dataset);
|
---|
257 | trainers(configFile);
|
---|
258 |
|
---|
259 | configFile.append(" <setwiseselector name=\"DecisionTreeSelection\" param=\"max median stddev\" />\n");
|
---|
260 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
261 |
|
---|
262 | postamble(configFile);
|
---|
263 | return configFile.toString();
|
---|
264 | }
|
---|
265 |
|
---|
266 | public static String CamargoCruz09(Dataset dataset) {
|
---|
267 | StringBuilder configFile = new StringBuilder();
|
---|
268 | preamble(configFile);
|
---|
269 | dataset(configFile, dataset);
|
---|
270 | trainers(configFile);
|
---|
271 |
|
---|
272 | configFile.append(" <preprocessor name=\"LogarithmTransform\" param=\"\" />\n");
|
---|
273 | configFile.append(" <preprocessor name=\"MedianAsReference\" param=\"10\" />\n");
|
---|
274 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
275 |
|
---|
276 | postamble(configFile);
|
---|
277 | return configFile.toString();
|
---|
278 | }
|
---|
279 |
|
---|
280 | public static String Liu10(Dataset dataset) {
|
---|
281 | StringBuilder configFile = new StringBuilder();
|
---|
282 | preamble(configFile);
|
---|
283 | dataset(configFile, dataset);
|
---|
284 |
|
---|
285 | configFile.append(" <setwisetrainer name=\"GPTraining\" param=\"numberRuns:1,errorType2Weight:15\" />");
|
---|
286 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
287 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
288 |
|
---|
289 | postamble(configFile);
|
---|
290 | return configFile.toString();
|
---|
291 | }
|
---|
292 |
|
---|
293 | public static String Menzies11(Dataset dataset) {
|
---|
294 | StringBuilder configFile = new StringBuilder();
|
---|
295 | preamble(configFile);
|
---|
296 | dataset(configFile, dataset);
|
---|
297 |
|
---|
298 | trainersLocalWhere(configFile);
|
---|
299 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
300 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
301 |
|
---|
302 | postamble(configFile);
|
---|
303 | return configFile.toString();
|
---|
304 | }
|
---|
305 |
|
---|
306 | public static String Ma12(Dataset dataset) {
|
---|
307 | StringBuilder configFile = new StringBuilder();
|
---|
308 | preamble(configFile);
|
---|
309 | dataset(configFile, dataset);
|
---|
310 | trainers(configFile);
|
---|
311 |
|
---|
312 | configFile.append(" <preprocessor name=\"DataGravitation\" param=\"\" />\n");
|
---|
313 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
314 |
|
---|
315 | postamble(configFile);
|
---|
316 | return configFile.toString();
|
---|
317 | }
|
---|
318 |
|
---|
319 | public static String Peters12(Dataset dataset) {
|
---|
320 | StringBuilder configFile = new StringBuilder();
|
---|
321 | preamble(configFile);
|
---|
322 | dataset(configFile, dataset);
|
---|
323 | trainers(configFile);
|
---|
324 |
|
---|
325 | configFile.append(" <preprocessor name=\"MORPH\" param=\"\" />\n");
|
---|
326 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
327 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
328 |
|
---|
329 | postamble(configFile);
|
---|
330 | return configFile.toString();
|
---|
331 | }
|
---|
332 |
|
---|
333 | public static String Uchigaki12(Dataset dataset) {
|
---|
334 | StringBuilder configFile = new StringBuilder();
|
---|
335 | preamble(configFile);
|
---|
336 | dataset(configFile, dataset);
|
---|
337 |
|
---|
338 | configFile.append(" <preprocessor name=\"ZScoreNormalization\" param=\"\" />\n");
|
---|
339 | configFile.append(" <trainer name=\"WekaTraining\" param=\"LE de.ugoe.cs.cpdp.wekaclassifier.LogisticEnsemble\" />\n");
|
---|
340 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
341 |
|
---|
342 | postamble(configFile);
|
---|
343 | return configFile.toString();
|
---|
344 | }
|
---|
345 |
|
---|
346 | public static String Canfora13(Dataset dataset) {
|
---|
347 | StringBuilder configFile = new StringBuilder();
|
---|
348 | preamble(configFile);
|
---|
349 | dataset(configFile, dataset);
|
---|
350 |
|
---|
351 | configFile.append(" <preprocessor name=\"ZScoreNormalization\" param=\"\" />\n");
|
---|
352 | configFile.append(" <trainer name=\"WekaTraining\" param=\"MODEP de.ugoe.cs.cpdp.wekaclassifier.MODEPClassifier -R 0.7\" />\n");
|
---|
353 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
354 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
355 |
|
---|
356 | postamble(configFile);
|
---|
357 | return configFile.toString();
|
---|
358 | }
|
---|
359 |
|
---|
360 | public static String Peters13(Dataset dataset) {
|
---|
361 | StringBuilder configFile = new StringBuilder();
|
---|
362 | preamble(configFile);
|
---|
363 | dataset(configFile, dataset);
|
---|
364 | trainers(configFile);
|
---|
365 |
|
---|
366 | configFile.append(" <preprocessor name=\"MORPH\" param=\"\" />\n");
|
---|
367 | configFile.append(" <pointwiseselector name=\"CLIFF\" param=\"0.40\" />");
|
---|
368 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
369 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
370 |
|
---|
371 | postamble(configFile);
|
---|
372 | return configFile.toString();
|
---|
373 | }
|
---|
374 |
|
---|
375 | public static String Herbold13(Dataset dataset) {
|
---|
376 | StringBuilder configFile = new StringBuilder();
|
---|
377 | preamble(configFile);
|
---|
378 | dataset(configFile, dataset);
|
---|
379 | trainers(configFile);
|
---|
380 |
|
---|
381 | int numNeighbors;
|
---|
382 | switch (dataset)
|
---|
383 | {
|
---|
384 | case AEEEM:
|
---|
385 | case AEEEM_LDHH:
|
---|
386 | case AEEEM_WCHU:
|
---|
387 | case AEEEM_LDHHWCHU:
|
---|
388 | numNeighbors = 2;
|
---|
389 | break;
|
---|
390 | case MDP:
|
---|
391 | numNeighbors = 5;
|
---|
392 | break;
|
---|
393 | case JURECZKO:
|
---|
394 | numNeighbors = 30;
|
---|
395 | break;
|
---|
396 | case FILTERJURECZKO:
|
---|
397 | numNeighbors = 20;
|
---|
398 | break;
|
---|
399 | case RELINK:
|
---|
400 | numNeighbors = 1;
|
---|
401 | break;
|
---|
402 | case NETGENE:
|
---|
403 | numNeighbors = 1;
|
---|
404 | break;
|
---|
405 | case SELECTEDJURECZKO:
|
---|
406 | numNeighbors = 4;
|
---|
407 | break;
|
---|
408 | case SMARTSHARK_ALL:
|
---|
409 | case SMARTSHARK_AST:
|
---|
410 | case SMARTSHARK_SM:
|
---|
411 | // TODO check num neighbors
|
---|
412 | default:
|
---|
413 | numNeighbors = 10;
|
---|
414 | break;
|
---|
415 | }
|
---|
416 |
|
---|
417 | configFile.append(" <setwisepreprocessor name=\"Normalization\" param=\"\" />\n");
|
---|
418 | configFile.append(" <setwiseselector name=\"SetWiseKNNSelection\" param=\""+ numNeighbors +"\" />\n");
|
---|
419 | configFile.append(" <postprocessor name=\"BiasedWeights\" param=\"0.5\" />\n");
|
---|
420 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
421 |
|
---|
422 | postamble(configFile);
|
---|
423 | return configFile.toString();
|
---|
424 | }
|
---|
425 |
|
---|
426 | public static String ZHe13(Dataset dataset) {
|
---|
427 | StringBuilder configFile = new StringBuilder();
|
---|
428 | preamble(configFile);
|
---|
429 | dataset(configFile, dataset);
|
---|
430 | trainersBagging(configFile);
|
---|
431 |
|
---|
432 | int numNeighbors;
|
---|
433 | switch (dataset)
|
---|
434 | {
|
---|
435 | case AEEEM:
|
---|
436 | case AEEEM_LDHH:
|
---|
437 | case AEEEM_LDHHWCHU:
|
---|
438 | case AEEEM_WCHU:
|
---|
439 | numNeighbors = 1;
|
---|
440 | break;
|
---|
441 | case MDP:
|
---|
442 | numNeighbors = 4;
|
---|
443 | break;
|
---|
444 | case JURECZKO:
|
---|
445 | numNeighbors = 16;
|
---|
446 | break;
|
---|
447 | case FILTERJURECZKO:
|
---|
448 | numNeighbors = 13;
|
---|
449 | break;
|
---|
450 | case RELINK:
|
---|
451 | numNeighbors = 1;
|
---|
452 | break;
|
---|
453 | case NETGENE:
|
---|
454 | numNeighbors = 1;
|
---|
455 | break;
|
---|
456 | case SELECTEDJURECZKO:
|
---|
457 | numNeighbors = 4;
|
---|
458 | break;
|
---|
459 | case SMARTSHARK_ALL:
|
---|
460 | case SMARTSHARK_AST:
|
---|
461 | case SMARTSHARK_SM:
|
---|
462 | // TODO check num neighbors
|
---|
463 | default:
|
---|
464 | numNeighbors = 10;
|
---|
465 | break;
|
---|
466 | }
|
---|
467 |
|
---|
468 | configFile.append(" <setwisepreprocessor name=\"Normalization\" param=\"\" />\n");
|
---|
469 | configFile.append(" <setwiseselector name=\"SeparatabilitySelection\" param=\"" + numNeighbors + "\" />\n");
|
---|
470 | configFile.append(" <setwisepostprocessor name=\"Undersampling\" param=\"\" />\n");
|
---|
471 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
472 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
473 |
|
---|
474 | postamble(configFile);
|
---|
475 | return configFile.toString();
|
---|
476 | }
|
---|
477 |
|
---|
478 | public static String Nam13(Dataset dataset) {
|
---|
479 | StringBuilder configFile = new StringBuilder();
|
---|
480 | preamble(configFile);
|
---|
481 | dataset(configFile, dataset);
|
---|
482 | trainers(configFile);
|
---|
483 |
|
---|
484 | configFile.append(" <preprocessor name=\"TCAPlusNormalization\" param=\"\" />\n");
|
---|
485 | configFile.append(" <postprocessor name=\"TransferComponentAnalysis\" param=\"\" />\n");
|
---|
486 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
487 |
|
---|
488 | postamble(configFile);
|
---|
489 | return configFile.toString();
|
---|
490 | }
|
---|
491 |
|
---|
492 | public static String Panichella14(Dataset dataset) {
|
---|
493 | StringBuilder configFile = new StringBuilder();
|
---|
494 | preamble(configFile);
|
---|
495 | dataset(configFile, dataset);
|
---|
496 |
|
---|
497 | configFile.append(" <trainer name=\"WekaTraining\" param=\"CODEP-LR de.ugoe.cs.cpdp.wekaclassifier.LogisticCODEP\" />\n");
|
---|
498 | configFile.append(" <trainer name=\"WekaTraining\" param=\"CODEP-BN de.ugoe.cs.cpdp.wekaclassifier.BayesNetCODEP\" />\n");
|
---|
499 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
500 |
|
---|
501 | postamble(configFile);
|
---|
502 | return configFile.toString();
|
---|
503 | }
|
---|
504 |
|
---|
505 | public static String Ryu14(Dataset dataset) {
|
---|
506 | StringBuilder configFile = new StringBuilder();
|
---|
507 | preamble(configFile);
|
---|
508 | dataset(configFile, dataset);
|
---|
509 |
|
---|
510 | configFile.append(" <preprocessor name=\"ZScoreNormalization\" param=\"\" />\n");
|
---|
511 | configFile.append(" <testawaretrainer name=\"WekaTestAwareTraining\" param=\"VCBSVM de.ugoe.cs.cpdp.wekaclassifier.VCBSVM -L 0.1 -B 10\" />\n");
|
---|
512 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
513 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
514 |
|
---|
515 | postamble(configFile);
|
---|
516 | return configFile.toString();
|
---|
517 | }
|
---|
518 |
|
---|
519 | public static String PHe15(Dataset dataset) {
|
---|
520 | StringBuilder configFile = new StringBuilder();
|
---|
521 | preamble(configFile);
|
---|
522 | dataset(configFile, dataset);
|
---|
523 | trainers(configFile);
|
---|
524 |
|
---|
525 | configFile.append(" <setwisepreprocessor name=\"LogarithmTransform\" param=\"\" />\n");
|
---|
526 | configFile.append(" <setwisepreprocessor name=\"TopMetricFilter\" param=\"\" />\n");
|
---|
527 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
528 |
|
---|
529 | postamble(configFile);
|
---|
530 | return configFile.toString();
|
---|
531 | }
|
---|
532 |
|
---|
533 | public static String Peters15(Dataset dataset) {
|
---|
534 | StringBuilder configFile = new StringBuilder();
|
---|
535 | preamble(configFile);
|
---|
536 | dataset(configFile, dataset);
|
---|
537 | trainers(configFile);
|
---|
538 |
|
---|
539 | configFile.append(" <setwisepreprocessor name=\"LogarithmTransform\" param=\"\" />\n");
|
---|
540 | configFile.append(" <setwiseselector name=\"LACE2\" param=\"0.4\" />\n");
|
---|
541 | configFile.append(" <pointwiseselector name=\"TurhanFilter\" param=\"1\" />\n");
|
---|
542 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
543 | configFile.append(" <repetitions number=\"10\" />\n");
|
---|
544 |
|
---|
545 | postamble(configFile);
|
---|
546 | return configFile.toString();
|
---|
547 | }
|
---|
548 |
|
---|
549 | public static String Kawata15(Dataset dataset) {
|
---|
550 | StringBuilder configFile = new StringBuilder();
|
---|
551 | preamble(configFile);
|
---|
552 | dataset(configFile, dataset);
|
---|
553 | trainers(configFile);
|
---|
554 |
|
---|
555 | configFile.append(" <pointwiseselector name=\"DBSCANFilter\" param=\"\" />\n");
|
---|
556 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
557 |
|
---|
558 | postamble(configFile);
|
---|
559 | return configFile.toString();
|
---|
560 | }
|
---|
561 |
|
---|
562 | public static String YZhang15(Dataset dataset) {
|
---|
563 | StringBuilder configFile = new StringBuilder();
|
---|
564 | preamble(configFile);
|
---|
565 | dataset(configFile, dataset);
|
---|
566 |
|
---|
567 | configFile.append(" <trainer name=\"WekaTraining\" param=\"AVGVOTE weka.classifiers.meta.Vote -S 1 -B "weka.classifiers.trees.ADTree" -B "de.ugoe.cs.cpdp.wekaclassifier.DecisionTableWrapper" -B "de.ugoe.cs.cpdp.wekaclassifier.BayesNetWrapper" -B "weka.classifiers.functions.MultilayerPerceptron" -B "weka.classifiers.functions.RBFNetwork" -R AVG\" />\n");
|
---|
568 | configFile.append(" <trainer name=\"WekaTraining\" param=\"MAXVOTE weka.classifiers.meta.Vote -S 1 -B "weka.classifiers.trees.ADTree" -B "de.ugoe.cs.cpdp.wekaclassifier.DecisionTableWrapper" -B "de.ugoe.cs.cpdp.wekaclassifier.BayesNetWrapper" -B "weka.classifiers.functions.MultilayerPerceptron" -B "weka.classifiers.functions.RBFNetwork" -R MAX\" />\n");
|
---|
569 | configFile.append(" <trainer name=\"WekaTraining\" param=\"BAG-DT weka.classifiers.meta.Bagging -P 100 -S 1 -I 10 -W weka.classifiers.trees.J48\" />\n");
|
---|
570 | configFile.append(" <trainer name=\"WekaTraining\" param=\"BAG-NB weka.classifiers.meta.Bagging -P 100 -S 1 -I 10 -W weka.classifiers.bayes.NaiveBayes\" />\n");
|
---|
571 | configFile.append(" <trainer name=\"WekaTraining\" param=\"BOOST-DT weka.classifiers.meta.AdaBoostM1 -P 100 -S 1 -I 10 -W weka.classifiers.trees.J48\" />\n");
|
---|
572 | configFile.append(" <trainer name=\"WekaTraining\" param=\"BOOST-NB weka.classifiers.meta.AdaBoostM1 -P 100 -S 1 -I 10 -W weka.classifiers.bayes.NaiveBayes\" />\n");
|
---|
573 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
574 |
|
---|
575 | postamble(configFile);
|
---|
576 | return configFile.toString();
|
---|
577 | }
|
---|
578 |
|
---|
579 | public static String Amasaki15(Dataset dataset) {
|
---|
580 | StringBuilder configFile = new StringBuilder();
|
---|
581 | preamble(configFile);
|
---|
582 | dataset(configFile, dataset);
|
---|
583 | trainers(configFile);
|
---|
584 |
|
---|
585 | configFile.append(" <preprocessor name=\"LogarithmTransform\" param=\"\" />\n");
|
---|
586 | configFile.append(" <preprocessor name=\"SynonymAttributePruning\" param=\"\" />\n");
|
---|
587 | configFile.append(" <pointwiseselector name=\"SynonymOutlierRemoval\" param=\"\" />");
|
---|
588 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
589 |
|
---|
590 | postamble(configFile);
|
---|
591 | return configFile.toString();
|
---|
592 | }
|
---|
593 |
|
---|
594 | public static String Ryu15(Dataset dataset) {
|
---|
595 | StringBuilder configFile = new StringBuilder();
|
---|
596 | preamble(configFile);
|
---|
597 | dataset(configFile, dataset);
|
---|
598 | trainersLASER(configFile);
|
---|
599 |
|
---|
600 | configFile.append(" <pointwiseselector name=\"MahalanobisOutlierRemoval\" param=\"\" />\n");
|
---|
601 | configFile.append(" <pointwiseselector name=\"NeighborhoodFilter\" param=\"\" />\n");
|
---|
602 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
603 |
|
---|
604 | postamble(configFile);
|
---|
605 | return configFile.toString();
|
---|
606 | }
|
---|
607 |
|
---|
608 | public static String Nam15(Dataset dataset) {
|
---|
609 | StringBuilder configFile = new StringBuilder();
|
---|
610 | preamble(configFile);
|
---|
611 | dataset(configFile, dataset);
|
---|
612 | trainers(configFile);
|
---|
613 |
|
---|
614 | configFile.append(" <preprocessor name=\"CLAMIProcessor\" param=\"\" />\n");
|
---|
615 | configFile.append(" <eval name=\"NormalWekaEvaluation\" param=\"\" />\n");
|
---|
616 |
|
---|
617 | postamble(configFile);
|
---|
618 | return configFile.toString();
|
---|
619 | }
|
---|
620 | }
|
---|