Package org.data2semantics.exp.molecules

Examples of org.data2semantics.exp.molecules.MoleculeListSingleGraphExperiment


    ResultsTable resTableIST = new ResultsTable();
    resTableIST.setDigits(3);
    //---------
     
    MoleculeListMultiGraphExperiment<DTGraph<String,String>> expWL;
    MoleculeListSingleGraphExperiment expIST;
   
   
    ///*
   
    for (int th : hubThs) {
      resTableWL.newRow("Hub Threshold: " + th);
      resTableIST.newRow("Hub Threshold: " + th);

      for (List<DTNode<String,String>> hubList : hubLists) {
        boolean regDegree = false;
        int maxSize = hubList.size();
        if (hubList == regDegreeHubs) {
          regDegree = true;
        }

        List<List<DTNode<String,String>>> newIN = new ArrayList<List<DTNode<String,String>>>();
        List<DTGraph<String,String>> newGs = GraphUtils.simplifyGraph3Way(graph3, GraphUtils.createHubMap(hubList.subList(0, Math.min(maxSize, th)), 10000, regDegree), instanceNodes3, newIN);

        ///*
       
        // 1
        List<WLSubTreeKernel> kernelsWL = new ArrayList<WLSubTreeKernel>();
       
        for (int iti : it) {
          kernelsWL.add(new WLSubTreeKernel(iti, true, forward));
        }   
       
        expWL = new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,  seeds, svmParms, GraphUtils.getSubGraphs(newGs.get(0), newIN.get(0), depth), target, evalFuncs);

        System.out.println("WL running, remove hubs, th: " + th);
        expWL.run();

        for (Result res : expWL.getResults()) {
          resTableWL.addResult(res);
        }

        // 2
        kernelsWL = new ArrayList<WLSubTreeKernel>();
        for (int iti : it) {
          kernelsWL.add(new WLSubTreeKernel(iti, true, forward));
        }
 
        expWL = new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,
            seeds, svmParms, GraphUtils.getSubGraphs(newGs.get(1), newIN.get(1), depth), target, evalFuncs);

        System.out.println("WL running, relabel hubs, th: " + th);
        expWL.run();

        for (Result res : expWL.getResults()) {
          resTableWL.addResult(res);
        }
       
       

        // 3
        kernelsWL = new ArrayList<WLSubTreeKernel>();
        for (int iti : it) {
          kernelsWL.add(new WLSubTreeKernel(iti, true, forward));
        }
       
        expWL = new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,
            seeds, svmParms, GraphUtils.getSubGraphs(newGs.get(2), newIN.get(2), depth), target, evalFuncs);

        System.out.println("WL running, relabel+remove hubs, th: " + th);
        expWL.run();

        for (Result res : expWL.getResults()) {
          resTableWL.addResult(res);
        }
       
        //*/
       
        ///*
        //-------
        // IST
        //-------
       
        // 1
        List<RDFDTGraphIntersectionSubTreeKernel> kernelsIST = new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
        kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(depth,1,true));

        expIST = new MoleculeListSingleGraphExperiment(kernelsIST, seeds, svmParms, newGs.get(0), newIN.get(0), target, evalFuncs);

        System.out.println("IST running, remove hubs, th: " + th);
        expIST.run();

        for (Result res : expIST.getResults()) {
          resTableIST.addResult(res);
        }

        // 2
        kernelsIST = new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
        kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(depth,1,true));
 
        expIST = new MoleculeListSingleGraphExperiment(kernelsIST, seeds, svmParms, newGs.get(1), newIN.get(1), target, evalFuncs);

        System.out.println("IST running, relabel hubs, th: " + th);
        expIST.run();

        for (Result res : expIST.getResults()) {
          resTableIST.addResult(res);
        }

        // 3
        kernelsIST = new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
        kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(depth,1,true));
       
        expIST = new MoleculeListSingleGraphExperiment(kernelsIST, seeds, svmParms, newGs.get(2), newIN.get(2), target, evalFuncs);

        System.out.println("IST running, relabel+remove hubs, th: " + th);
        expIST.run();

        for (Result res : expIST.getResults()) {
          resTableIST.addResult(res);
        }
       
        //*/

 
View Full Code Here

TOP

Related Classes of org.data2semantics.exp.molecules.MoleculeListSingleGraphExperiment

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.