Package org.data2semantics.proppred.kernels.rdfgraphkernels

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFIntersectionSubTreeKernel$Pair


        LibSVMParameters svmParms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
        svmParms.setNumFolds(5);


        KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(i, 1, inference, true), seeds2, svmParms, dataset, instances, labels, blackList);

        System.out.println("Running IST: " + i);
        exp.run();
        res.add(exp.getResults());
      }
View Full Code Here


   
    for (int d : depths) {
      resTable.newRow("IST, depth="+d);

      RDFOldKernelExperiment exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(d, 1, inference, true), seeds, svmParms, dataset, instances, labels, blackList);

      System.out.println("Running IST: " + d);
      exp.run();

      for (Result res : exp.getResults()) {
View Full Code Here

   
     
      comp = new double[seeds.length];
      for (int i = 0; i < seeds.length; i++) {
        createGeoDataSet((int)(1000 * frac), frac, seeds[i], "http://data.bgs.ac.uk/ref/Lexicon/hasTheme");   
        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

    }
    System.out.println(resTable);
   
    for (int depth : depths) {
      resTable.newRow("IST, depth="+depth);
      RDFOldKernelExperiment exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(depth, 1, inference, true), seeds, svmParms, dataset, instances, labels, blackList);

      System.out.println("Running IST: " + depth);
      exp.run();

      for (Result res : exp.getResults()) {
View Full Code Here

      res.setLabel("runtime");
      for (long seed : seeds) {

        createAffiliationPredictionDataSet(frac, seed);

        KernelExperiment<RDFGraphKernel> exp = new RDFKernelRunTimeExperiment(new RDFIntersectionSubTreeKernel(depth, 1, inference, true, false), seeds, parms, dataset, instances, labels, blackList);

        System.out.println("Running IST: " + frac);
        exp.run();
        res.addResult(exp.getResults().get(0));
      }
View Full Code Here


    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()) {
View Full Code Here

      Result res = new Result();
      res.setLabel("runtime");
      for (long seed : seeds) {
        createGeoDataSet(seed,frac,6,"http://data.bgs.ac.uk/ref/Lexicon/hasLithogenesis");

        KernelExperiment<RDFGraphKernel> exp = new RDFKernelRunTimeExperiment(new RDFIntersectionSubTreeKernel(depth, 1, inference, true, false), seeds, parms, dataset, instances, labels, blackList);

        System.out.println("Running IST: " + frac);
        exp.run();
        res.addResult(exp.getResults().get(0));
      }
View Full Code Here

      List<List<Result>> res = new ArrayList<List<Result>>();
      for (long seed : seeds) {
        long[] s2 = new long[1];
        s2[0] = seed;
        createGeoDataSet(seed, fraction,  minSize, "http://data.bgs.ac.uk/ref/Lexicon/hasTheme");
        KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(i, 1, inference, true, false), s2, parms, dataset, instances, labels, blackList);
        res.add(exp.getResults());

        System.out.println("Running IST: " + i);
        if (experimenter.hasSpace()) {
          experimenter.addExperiment(exp);
        }
      }

      experimenter.stop();

      while (expT.isAlive()) {
        try {
          Thread.sleep(1000);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }

      for (Result res2 : Result.mergeResultLists(res)) {
        resTable.addResult(res2);
      }
    }
    saveResults(resTable, "geo_theme.ser");


    inference = true;
    for (int i = 1; i <= depth; i++) {
      resTable.newRow("IST, inference, depth="+i);

      Experimenter experimenter = new Experimenter(2);
      Thread expT = new Thread(experimenter);
      expT.setDaemon(true);
      expT.start();

      List<List<Result>> res = new ArrayList<List<Result>>();
      for (long seed : seeds) {
        long[] s2 = new long[1];
        s2[0] = seed;
        createGeoDataSet(seed, fraction,  minSize, "http://data.bgs.ac.uk/ref/Lexicon/hasTheme");
        KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(i, 1, inference, true, false), s2, parms, dataset, instances, labels, blackList);
        res.add(exp.getResults());


        System.out.println("Running IST: " + i);
        if (experimenter.hasSpace()) {
View Full Code Here


    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, "geo_litho.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()) {
View Full Code Here

    //*/

    ///*
    for (int i : depths) {     
      resTable.newRow("RDF IST, " + i);
      RDFIntersectionSubTreeKernel k = new RDFIntersectionSubTreeKernel(i, 1, inference, true);
     
      KernelExperiment<RDFGraphKernel> exp = new RDFGraphKernelExperiment(k, seeds, svmParms, dataset, instances, target, blackList, evalFuncs);

      System.out.println("Running RDF IST: " + i);
      exp.run();

      for (Result res : exp.getResults()) {
        resTable.addResult(res);
     
    }
    System.out.println(resTable);
    //*/

    ///*
    for (int i : depths) {     
      resTable.newRow("RDF IST TYPE, " + i);
      RDFIntersectionSubTreeSlashBurnKernel k = new RDFIntersectionSubTreeSlashBurnKernel(i, 1, inference, true);
      k.setHubMap(GraphUtils.createRDFTypeHubMap(dataset, inference));

      KernelExperiment<RDFGraphKernel> exp = new RDFGraphKernelExperiment(k, seeds, svmParms, dataset, instances, target, blackList, evalFuncs);

      System.out.println("Running RDF IST TYPE: " + i);
      exp.run();

      for (Result res : exp.getResults()) {
        resTable.addResult(res);
     
    }
    System.out.println(resTable);
    //*/


    ///*
    for (int h : hf) {
      for (int i : depths) {     
        resTable.newRow("RDF IST Regular Degree, " + h + ", " + i);
        RDFIntersectionSubTreeSlashBurnKernel k = new RDFIntersectionSubTreeSlashBurnKernel(i, 1, inference, true);
        k.setHubMap(GraphUtils.createNonSigHubMap(nonSigDegreeHubs, h));

        KernelExperiment<RDFGraphKernel> exp = new RDFGraphKernelExperiment(k, seeds, svmParms, dataset, instances, target, blackList, evalFuncs);

        System.out.println("Running RDF IST Regular Degree: " + i + " " + h);
        exp.run();

        for (Result res : exp.getResults()) {
          resTable.addResult(res);
       
      }
    }
    System.out.println(resTable);
    //*/


    ///*
    for (int h : hf) {
      for (int i : depths) {     
        resTable.newRow("RDF IST Signature Degree (SB), " + h + ", " + i);
        RDFIntersectionSubTreeSlashBurnKernel k = new RDFIntersectionSubTreeSlashBurnKernel(i, 1, inference, true);
        k.setHubMap(GraphUtils.createHubMap(hubs, h));

        KernelExperiment<RDFGraphKernel> exp = new RDFGraphKernelExperiment(k, seeds, svmParms, dataset, instances, target, blackList, evalFuncs);

        System.out.println("Running RDF IST Signature Degree (SB): " + i + " " + h);
        exp.run();
View Full Code Here

TOP

Related Classes of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFIntersectionSubTreeKernel$Pair

Copyright © 2018 www.massapicom. 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.