package de.ugoe.cs.crosspare; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.security.InvalidParameterException; public class ConfigurationBuilder { private static enum Dataset { MDP, MDP_EFFNORM, MDP_EFFLOGNORM, JURECZKO, FILTERJURECZKO, SELECTEDJURECZKO, JURECZKO_NUMERIC, JURECZKO_EFFNORM, JURECZKO_EFFLOGNORM, JURECZKO_EFFNORM_NUMERIC, JURECZKO_EFFLOGNORM_NUMERIC, JURECZKO_NUMERIC_DUPLICATE, JURECZKO_NUMERIC_WEIGHTS, AEEEM, AEEEM_LDHH, AEEEM_WCHU, AEEEM_LDHHWCHU, AEEEM_NUMERIC, AEEEM_LDHH_NUMERIC, AEEEM_WCHU_NUMERIC, AEEEM_LDHHWCHU_NUMERIC, AEEEM_LDHHWCHU_EFFNORM, AEEEM_LDHHWCHU_EFFLOGNORM, AEEEM_LDHHWCHU_EFFNORM_NUMERIC, AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC, AEEEM_LDHHWCHU_NUMERIC_DUPLICATE, AEEEM_LDHHWCHU_NUMERIC_WEIGHTS, RELINK, RELINK_EFFNORM, RELINK_EFFLOGNORM, NETGENE, NETGENE_NUMERIC, NETGENE_NUMERIC_DUPLICATE, NETGENE_NUMERIC_WEIGHTS, SMARTSHARK_ALL, SMARTSHARK_AST, SMARTSHARK_SM, SMARTSHARK_ALL_NUMERIC } private static final String storageFolder = "config/"; private static final String HPCConfigFolder = "../cpdp-experiments/HPC/benchmark/"; public static void main(String[] args) { for( Dataset dataset : Dataset.values() ) { // baselines writeFile("ALL", dataset); writeFile("CV", dataset); writeFile("Random", dataset); writeFile("Trivial", dataset); // publications writeFile("Koshgoftaar08", dataset); writeFile("Watanabe08", dataset); writeFile("Turhan09", dataset); writeFile("Zimmermann09", dataset); writeFile("CamargoCruz09", dataset); writeFile("Liu10", dataset); writeFile("Menzies11", dataset); writeFile("Ma12", dataset); writeFile("Peters12", dataset); writeFile("Uchigaki12", dataset); writeFile("Canfora13", dataset); writeFile("Peters13", dataset); writeFile("Herbold13", dataset); writeFile("ZHe13", dataset); writeFile("Nam13", dataset); writeFile("Panichella14", dataset); writeFile("Ryu14", dataset); writeFile("PHe15", dataset); writeFile("Peters15", dataset); writeFile("Kawata15", dataset); writeFile("YZhang15", dataset); writeFile("Amasaki15", dataset); writeFile("Ryu15", dataset); writeFile("Nam15", dataset); writeFile("Tantithamthavorn16", dataset); writeFile("Hosseini16", dataset); writeFile("FZhang16", dataset); } } public static void writeFile(String approach, Dataset dataset) { File file = new File(storageFolder + dataset.toString() + "/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } file = new File(storageFolder + "ALL/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } if( approach.equals("Nam13") && (dataset.toString().startsWith("JUR") || dataset.toString().startsWith("NET") || dataset.toString().startsWith("MDP"))) { file = new File(HPCConfigFolder + "config-infeasible/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } } else if( dataset==Dataset.AEEEM_LDHHWCHU || dataset==Dataset.JURECZKO || dataset==Dataset.NETGENE || dataset==Dataset.RELINK || dataset==Dataset.MDP ) { file = new File(HPCConfigFolder + "config/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } } else if( dataset==Dataset.AEEEM_LDHHWCHU_NUMERIC_DUPLICATE || dataset==Dataset.JURECZKO_NUMERIC_DUPLICATE || dataset==Dataset.NETGENE_NUMERIC_DUPLICATE ) { file = new File(HPCConfigFolder + "config-duplicates/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } } else if( dataset==Dataset.AEEEM_LDHHWCHU_NUMERIC || dataset==Dataset.JURECZKO_NUMERIC || dataset==Dataset.NETGENE_NUMERIC ) { file = new File(HPCConfigFolder + "config-numeric/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } } else if( dataset==Dataset.AEEEM_LDHHWCHU_NUMERIC_WEIGHTS || dataset==Dataset.JURECZKO_NUMERIC_WEIGHTS || dataset==Dataset.NETGENE_NUMERIC_WEIGHTS ) { file = new File(HPCConfigFolder + "config-weights/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } } else if( dataset==Dataset.AEEEM_LDHHWCHU_EFFNORM_NUMERIC || dataset==Dataset.JURECZKO_EFFNORM_NUMERIC || dataset==Dataset.RELINK_EFFNORM || dataset==Dataset.MDP_EFFNORM ) { file = new File(HPCConfigFolder + "config-effnorm/"+ dataset.toString() + "-" + approach + ".xml"); file.getParentFile().mkdirs(); try(FileWriter writer = new FileWriter(file);) { writer.append((String) ConfigurationBuilder.class.getMethod(approach, Dataset.class).invoke(null, dataset)); writer.flush(); } catch (IOException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } } } public static void preamble(StringBuilder configFile) { configFile.append("\n"); configFile.append("\n"); } public static void postamble(StringBuilder configFile) { configFile.append(" \n"); configFile.append(""); } public static void trainers(StringBuilder configFile) { configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); } public static void trainersBagging(StringBuilder configFile) { configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); } public static void trainersLocalWhere(StringBuilder configFile) { configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); } public static void trainersLASER(StringBuilder configFile) { configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); } public static void dataset(StringBuilder configFile, Dataset dataset) { switch (dataset) { case MDP: configFile.append(" \n"); break; case MDP_EFFNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case MDP_EFFLOGNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case JURECZKO: configFile.append(" \n"); break; case JURECZKO_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); break; case FILTERJURECZKO: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case SELECTEDJURECZKO: configFile.append(" \n"); break; case JURECZKO_EFFNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case JURECZKO_EFFLOGNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case JURECZKO_EFFNORM_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case JURECZKO_EFFLOGNORM_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case JURECZKO_NUMERIC_DUPLICATE: configFile.append(" \n"); configFile.append(" \n"); break; case JURECZKO_NUMERIC_WEIGHTS: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM: configFile.append(" \n"); break; case AEEEM_LDHH: configFile.append(" \n"); break; case AEEEM_LDHHWCHU: configFile.append(" \n"); break; case AEEEM_WCHU: configFile.append(" \n"); break; case AEEEM_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHH_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHHWCHU_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_WCHU_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHHWCHU_EFFNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHHWCHU_EFFLOGNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHHWCHU_EFFNORM_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHHWCHU_NUMERIC_DUPLICATE: configFile.append(" \n"); configFile.append(" \n"); break; case AEEEM_LDHHWCHU_NUMERIC_WEIGHTS: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case RELINK: configFile.append(" \n"); break; case RELINK_EFFNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case RELINK_EFFLOGNORM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case NETGENE: configFile.append(" \n"); break; case NETGENE_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); break; case NETGENE_NUMERIC_DUPLICATE: configFile.append(" \n"); configFile.append(" \n"); break; case NETGENE_NUMERIC_WEIGHTS: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case SMARTSHARK_ALL: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case SMARTSHARK_AST: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case SMARTSHARK_SM: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; case SMARTSHARK_ALL_NUMERIC: configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); break; default: throw new InvalidParameterException("Unknown data set: " + dataset.toString()); } configFile.append(" \n"); configFile.append(" \n"); } public static String ALL(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String CV(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Random(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Trivial(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Koshgoftaar08(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainersBagging(configFile); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Watanabe08(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Turhan09(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Zimmermann09(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String CamargoCruz09(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Liu10(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" "); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Menzies11(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainersLocalWhere(configFile); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Ma12(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Peters12(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Uchigaki12(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Canfora13(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Peters13(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" "); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Herbold13(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); int numNeighbors; switch (dataset) { case AEEEM: case AEEEM_LDHH: case AEEEM_LDHHWCHU: case AEEEM_WCHU: case AEEEM_NUMERIC: case AEEEM_LDHH_NUMERIC: case AEEEM_LDHHWCHU_NUMERIC: case AEEEM_WCHU_NUMERIC: case AEEEM_LDHHWCHU_EFFNORM: case AEEEM_LDHHWCHU_EFFLOGNORM: case AEEEM_LDHHWCHU_EFFNORM_NUMERIC: case AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC: case AEEEM_LDHHWCHU_NUMERIC_DUPLICATE: case AEEEM_LDHHWCHU_NUMERIC_WEIGHTS: numNeighbors = 2; break; case MDP: case MDP_EFFNORM: case MDP_EFFLOGNORM: numNeighbors = 5; break; case JURECZKO: case JURECZKO_NUMERIC: case JURECZKO_EFFNORM: case JURECZKO_EFFLOGNORM: case JURECZKO_EFFNORM_NUMERIC: case JURECZKO_EFFLOGNORM_NUMERIC: case JURECZKO_NUMERIC_DUPLICATE: case JURECZKO_NUMERIC_WEIGHTS: numNeighbors = 30; break; case FILTERJURECZKO: numNeighbors = 20; break; case RELINK: case RELINK_EFFNORM: case RELINK_EFFLOGNORM: numNeighbors = 1; break; case NETGENE: case NETGENE_NUMERIC: case NETGENE_NUMERIC_DUPLICATE: case NETGENE_NUMERIC_WEIGHTS: numNeighbors = 1; break; case SELECTEDJURECZKO: numNeighbors = 4; break; case SMARTSHARK_ALL: case SMARTSHARK_AST: case SMARTSHARK_SM: case SMARTSHARK_ALL_NUMERIC: // TODO check num neighbors default: numNeighbors = 10; break; } configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String ZHe13(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainersBagging(configFile); int numNeighbors; switch (dataset) { case AEEEM: case AEEEM_LDHH: case AEEEM_LDHHWCHU: case AEEEM_WCHU: case AEEEM_NUMERIC: case AEEEM_LDHH_NUMERIC: case AEEEM_LDHHWCHU_NUMERIC: case AEEEM_WCHU_NUMERIC: case AEEEM_LDHHWCHU_EFFNORM: case AEEEM_LDHHWCHU_EFFLOGNORM: case AEEEM_LDHHWCHU_EFFNORM_NUMERIC: case AEEEM_LDHHWCHU_EFFLOGNORM_NUMERIC: case AEEEM_LDHHWCHU_NUMERIC_DUPLICATE: case AEEEM_LDHHWCHU_NUMERIC_WEIGHTS: numNeighbors = 1; break; case MDP: case MDP_EFFNORM: case MDP_EFFLOGNORM: numNeighbors = 4; break; case JURECZKO: case JURECZKO_NUMERIC: case JURECZKO_NUMERIC_DUPLICATE: case JURECZKO_NUMERIC_WEIGHTS: case JURECZKO_EFFNORM: case JURECZKO_EFFLOGNORM: case JURECZKO_EFFNORM_NUMERIC: case JURECZKO_EFFLOGNORM_NUMERIC: numNeighbors = 16; break; case FILTERJURECZKO: numNeighbors = 13; break; case RELINK: case RELINK_EFFNORM: case RELINK_EFFLOGNORM: numNeighbors = 1; break; case NETGENE: case NETGENE_NUMERIC: case NETGENE_NUMERIC_DUPLICATE: case NETGENE_NUMERIC_WEIGHTS: numNeighbors = 1; break; case SELECTEDJURECZKO: numNeighbors = 4; break; case SMARTSHARK_ALL: case SMARTSHARK_AST: case SMARTSHARK_SM: case SMARTSHARK_ALL_NUMERIC: // TODO check num neighbors default: numNeighbors = 10; break; } configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Nam13(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Panichella14(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Ryu14(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String PHe15(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Peters15(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Kawata15(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String YZhang15(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Amasaki15(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" "); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Ryu15(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainersLASER(configFile); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Nam15(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); trainers(configFile); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Tantithamthavorn16(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); //configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String Hosseini16(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } public static String FZhang16(Dataset dataset) { StringBuilder configFile = new StringBuilder(); preamble(configFile); dataset(configFile, dataset); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); configFile.append(" \n"); postamble(configFile); return configFile.toString(); } }