for (int i = 1; i <= depth; i++) {
resTable.newRow("WL RDF, no inference, depth=" + i);
for (int it : iterations) {
ECML2013RDFWLSubTreeKernel k = new ECML2013RDFWLSubTreeKernel(it, i, inference, true, blankLabels);
KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(k, seeds, parms, dataset, instances, labels, blackList);
System.out.println("Running WL RDF: " + i + " " + it);
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
}
}
saveResults(resTable, "affiliation.ser");
inference = true;
for (int i = 1; i <= depth; i++) {
resTable.newRow("WL RDF, inference, depth=" + i);
for (int it : iterations) {
ECML2013RDFWLSubTreeKernel k = new ECML2013RDFWLSubTreeKernel(it, i, inference, true, blankLabels);
KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(k, seeds, parms, dataset, instances, labels, blackList);
System.out.println("Running WL RDF: " + i + " " + it);
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
}
}
saveResults(resTable, "affiliation.ser");
inference = false;
for (int i = 1; i <= depth; i++) {
resTable.newRow("IST, no inference, depth=" + i);
KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(i, 1, inference, true, blankLabels), seeds, parms, dataset, instances, labels, blackList);
System.out.println("Running IST: " + i + " ");
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
}
saveResults(resTable, "affiliation.ser");
inference = true;
for (int i = 1; i <= depth; i++) {
resTable.newRow("IST, inference, depth=" + i);
KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(i, 1, inference, true, blankLabels), seeds, parms, dataset, instances, labels, blackList);
System.out.println("Running IST: " + i + " ");
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
}
saveResults(resTable, "affiliation.ser");
inference = false;
for (int i = 1; i <= depth; i++) {
resTable.newRow("IPST, no inference, depth=" + i);
KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionPartialSubTreeKernel(i, 0.01, inference, true, blankLabels), seeds, parms, dataset, instances, labels, blackList);
System.out.println("Running IPST: " + i + " ");
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
}
saveResults(resTable, "affiliation.ser");
inference = true;
for (int i = 1; i <= depth; i++) {
resTable.newRow("IPST, inference, depth=" + i);
KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionPartialSubTreeKernel(i, 0.01, inference, true, blankLabels), seeds, parms, dataset, instances, labels, blackList);
System.out.println("Running IPST: " + i + " ");
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
}
saveResults(resTable, "affiliation.ser");
List<GeneralPredictionDataSetParameters> dataSetsParams = new ArrayList<GeneralPredictionDataSetParameters>();
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 1, false, false));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 2, false, false));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 3, false, false));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 1, false, true));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 2, false, true));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 3, false, true));
int[] iterationsIG = {1,2};
long tic, toc;
for (GeneralPredictionDataSetParameters params : dataSetsParams) {
tic = System.currentTimeMillis();
PropertyPredictionDataSet ds = DataSetFactory.createPropertyPredictionDataSet(params);
toc = System.currentTimeMillis();
if (blankLabels) {
ds.removeVertexAndEdgeLabels();
}
resTable.newRow("WL");
for (int it : iterations) {
KernelExperiment<GraphKernel> exp = new GraphKernelExperiment(new ECML2013WLSubTreeKernel(it), seeds, parms, ds.getGraphs(), labels);
System.out.println("Running WL: " + it);
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
double[] comps = {0,0};
comps[0] = toc-tic;
comps[1] = toc-tic;
Result resC = new Result(comps,"comp time 2");
resTable.addResult(resC);
}
}
saveResults(resTable, "affiliation.ser");
/*
dataSetsParams = new ArrayList<GeneralPredictionDataSetParameters>();
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 1, false, false));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 2, false, false));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 1, false, true));
dataSetsParams.add(new GeneralPredictionDataSetParameters(dataset, blackLists, instances, 2, false, true));
*/
for (GeneralPredictionDataSetParameters params : dataSetsParams) {
tic = System.currentTimeMillis();
PropertyPredictionDataSet ds = DataSetFactory.createPropertyPredictionDataSet(params);
toc = System.currentTimeMillis();
if (blankLabels) {
ds.removeVertexAndEdgeLabels();
}
resTable.newRow("IGP");
for (int it : iterationsIG) {
KernelExperiment<GraphKernel> exp = new GraphKernelExperiment(new ECML2013IntersectionGraphPathKernel(it,1), seeds, parms, ds.getGraphs(), labels);
System.out.println("Running IGP: " + it);
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
double[] comps = {0,0};
comps[0] = toc-tic;
comps[1] = toc-tic;
Result resC = new Result(comps,"comp time 2");
resTable.addResult(resC);
}
}
saveResults(resTable, "affiliation.ser");
for (GeneralPredictionDataSetParameters params : dataSetsParams) {
tic = System.currentTimeMillis();
PropertyPredictionDataSet ds = DataSetFactory.createPropertyPredictionDataSet(params);
toc = System.currentTimeMillis();
if (blankLabels) {
ds.removeVertexAndEdgeLabels();
}
resTable.newRow("IGW");
for (int it : iterationsIG) {
KernelExperiment<GraphKernel> exp = new GraphKernelExperiment(new ECML2013IntersectionGraphWalkKernel(it,1), seeds, parms, ds.getGraphs(), labels);
System.out.println("Running IGW: " + it);
exp.run();
for (Result res : exp.getResults()) {
resTable.addResult(res);
}
double[] comps = {0,0};
comps[0] = toc-tic;