Examples of compute()


Examples of org.data2semantics.proppred.kernels.graphkernels.GraphKernel.compute()

     
      GraphKernel k = new WLSubTreeKernel(6,true);
     
      System.out.println("WL: " + frac);
      tic = System.currentTimeMillis();
      k.compute(ds.getGraphs());
      toc = System.currentTimeMillis();
      double[] comp = {(toc-tic) + dsComp};
      Result res = new Result(comp, "comp time");
      resTable.addResult(res);
    }   
View Full Code Here

Examples of org.data2semantics.proppred.kernels.graphkernels.WLSubTreeKernel.compute()

     
      GraphKernel k = new WLSubTreeKernel(6,true);
     
      System.out.println("WL: " + frac);
      tic = System.currentTimeMillis();
      k.compute(ds.getGraphs());
      toc = System.currentTimeMillis();
      double[] comp = {(toc-tic) + dsComp};
      Result res = new Result(comp, "comp time");
      resTable.addResult(res);
    }   
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFFeatureVectorKernel.compute()

        RDFGraphKernel k = new RDFWLSubTreeKernel(6,3,false, true);

        System.out.println("RDF WL Kernel: " + frac);
        tic = System.currentTimeMillis();
        k.compute(dataset, instances, blackList);
        toc = System.currentTimeMillis();
        comp[i] = toc-tic;
      }
      res = new Result(comp, "RDF WL Kernel");
      resTable.addResult(res);
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFGraphKernel.compute()

        RDFGraphKernel k = new RDFWLSubTreeKernel(6,3,false, true);

        System.out.println("RDF WL Kernel: " + frac);
        tic = System.currentTimeMillis();
        k.compute(dataset, instances, blackList);
        toc = System.currentTimeMillis();
        comp[i] = toc-tic;
      }
      res = new Result(comp, "RDF WL Kernel");
      resTable.addResult(res);
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFIntersectionPartialSubTreeKernel.compute()

    for (Resource instance : instances) {
      blackList.addAll(dataset.getStatementsFromStrings(instance.toString(), "http://swrc.ontoware.org/ontology#affiliation", null));
      blackList.addAll(dataset.getStatementsFromStrings(null, "http://swrc.ontoware.org/ontology#employs", instance.toString()));
    }
    RDFIntersectionPartialSubTreeKernel kernel = new RDFIntersectionPartialSubTreeKernel();
    double[][] matrix = kernel.compute(dataset, instances, blackList);
   
    for (int i = 0; i < matrix.length; i++) {
      System.out.println(Arrays.toString(matrix[i]));
    }
  }
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFIntersectionSubTreeKernel.compute()

        RDFGraphKernel k = new RDFIntersectionSubTreeKernel(3,1, false, true);


        System.out.println("RDF IST: " + frac);
        tic = System.currentTimeMillis();
        k.compute(dataset, instances, blackList);
        toc = System.currentTimeMillis();
        comp[i] = toc-tic;
      }
      res = new Result(comp, "RDF IST");
      resTable.addResult(res);
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFIntersectionTreeEdgeVertexPathKernel.compute()

        RDFGraphKernel k = new RDFIntersectionTreeEdgeVertexPathKernel(3,false, false, true);

        System.out.println("RDF ITP Kernel: " + frac);
        tic = System.currentTimeMillis();
        k.compute(dataset, instances, blackList);
        toc = System.currentTimeMillis();
        comp[i] = toc-tic;
      }
      res = new Result(comp, "RDF ITP Kernel");
      resTable.addResult(res);
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFIntersectionTreeEdgeVertexPathWithTextKernel.compute()

        RDFGraphKernel k = new RDFIntersectionSubTreeKernel(3,1, false, true);


        System.out.println("RDF IST: " + frac);
        tic = System.currentTimeMillis();
        k.compute(dataset, instances, blackList);
        toc = System.currentTimeMillis();
        comp[i] = toc-tic;
      }
      res = new Result(comp, "comp time");
      resTable.addResult(res);
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFPairKernel.compute()

    RDFPairKernel kernel = new RDFPairKernel();
    RDFWLSubTreeKernel k1 = new RDFWLSubTreeKernel(4,2,true,true);
    RDFWLSubTreeKernel k2 = new RDFWLSubTreeKernel(4,2,true,true);
   
    // Compute the kernel
    double[][] matrix = kernel.compute(dataset, instances, blacklist, k1, k2);
   
    double[] cs = {0.001, 0.01, 0.1, 1, 10, 100, 1000};
    LibSVMParameters parms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
   
    parms.setWeightLabels(EvaluationUtils.computeWeightLabels(target));
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFWLSubTreeKernel.compute()

        RDFGraphKernel k = new RDFWLSubTreeKernel(6,3,false, true);

        System.out.println("RDF WL Kernel: " + frac);
        tic = System.currentTimeMillis();
        k.compute(dataset, instances, blackList);
        toc = System.currentTimeMillis();
        comp[i] = toc-tic;
      }
      res = new Result(comp, "RDF WL Kernel");
      resTable.addResult(res);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.