Examples of computeFeatureVectors()


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

      RDFFeatureVectorKernel k = new RDFWLSubTreeKernel(6,3,false, true);
     
      System.out.println("RDF WL FV: " + frac);
      tic = System.currentTimeMillis();
      k.computeFeatureVectors(dataset, instances, blackList);
      toc = System.currentTimeMillis();
      double[] comp = {toc-tic};
      Result res = new Result(comp, "comp time");
      resTable.addResult(res);
   
View Full Code Here

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

      RDFFeatureVectorKernel k = new RDFWLSubTreeKernelString(6,3, false, true);
 
     
      System.out.println("RDF WL String FV: " + frac);
      tic = System.currentTimeMillis();
      k.computeFeatureVectors(dataset, instances, blackList);
      toc = System.currentTimeMillis();
      double[] comp = {toc-tic};
      Result res = new Result(comp, "comp time");
      resTable.addResult(res);
    }
View Full Code Here

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

     
      FeatureVectorKernel k = new WLSubTreeKernel(6,true);
     
      System.out.println("WL: " + frac);
      tic = System.currentTimeMillis();
      k.computeFeatureVectors(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.RDFWLSubTreeKernel.computeFeatureVectors()

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

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

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

        RDFFeatureVectorKernel k = new RDFWLSubTreeWithTextKernel(6,3,false, false);

        System.out.println("RDF WL text FV: " + frac);
        tic = System.currentTimeMillis();
        TextUtils.computeTFIDF(Arrays.asList(k.computeFeatureVectors(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.RDFWLSubTreeKernel.computeFeatureVectors()

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

        System.out.println("RDF EVP FV: " + frac);
        tic = System.currentTimeMillis();
        k.computeFeatureVectors(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.RDFWLSubTreeKernel.computeFeatureVectors()

        RDFFeatureVectorKernel k = new RDFIntersectionTreeEdgeVertexPathWithTextKernel(3,false, false, false);

        System.out.println("EVP text FV: " + frac);
        tic = System.currentTimeMillis();
        TextUtils.computeTFIDF(Arrays.asList(k.computeFeatureVectors(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.RDFWLSubTreeKernel.computeFeatureVectors()

        FeatureVectorKernel k = new WLSubTreeKernel(6,true);

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

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFWLSubTreeWithTextKernel.computeFeatureVectors()

   
    List<Resource> allInstances = new ArrayList<Resource>(instances);
    allInstances.addAll(testInstances);
   
    System.out.println("Computing kernel....");
    SparseVector[] fv = kernel.computeFeatureVectors(dataset, allInstances, blackList);
    System.out.println("Computing TFIDF....");
    fv = TextUtils.computeTFIDF(Arrays.asList(fv)).toArray(new SparseVector[1]);
    fv = KernelUtils.normalize(fv);
   
    SparseVector[] trainFV = Arrays.copyOfRange(fv, 0, instances.size());
View Full Code Here

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFWLSubTreeWithTextKernel.computeFeatureVectors()

        List<Double> tempLabelsBins = new ArrayList<Double>();
        tempLabels.addAll(target);
        tempLabelsBins.addAll(targetBins);

        tic = System.currentTimeMillis();
        SparseVector[] fv = kernel.computeFeatureVectors(dataset, instances, blackList);
        toc = System.currentTimeMillis();

        fv = TextUtils.computeTFIDF(Arrays.asList(fv)).toArray(new SparseVector[1]);
        fv = KernelUtils.normalize(fv);
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.