Package org.data2semantics.proppred.kernels.rdfgraphkernels

Examples of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFWLSubTreeKernel


    for (int i : depths) {     
      for (int it : iterations) {
        resTable.newRow("");

        LibLINEARParameters linParms = new LibLINEARParameters(LibLINEARParameters.SVC_DUAL, cs);
        KernelExperiment<RDFFeatureVectorKernel> exp = new RDFLinearKernelExperiment(new RDFWLSubTreeKernel(it, i, inference, true), seeds, linParms, dataset, instances, target, blackList, evalFuncs);

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

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


 
    // create a list of doubles as train target
    List<Double> target = EvaluationUtils.createTarget(labels);

    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};
View Full Code Here

   
    // We remove classes with fewer than 5 instances
    EvaluationUtils.removeSmallClasses(instances, labels, 5);
   
    // Create the RDFFeatureVectorKernel that we are going to use
    RDFFeatureVectorKernel kernel = new RDFWLSubTreeKernel(6,3,true,true);
   
    // Compute feature vectors
    SparseVector[] featureVectors = kernel.computeFeatureVectors(dataset, instances, blackList);
   
    // Create a list of doubles as target, with our labelMap, so that we can use it later on (i.e. get the reverseMap)
    Map<Value, Double> labelMap = new HashMap<Value, Double>();
    List<Double> target = EvaluationUtils.createTarget(labels, labelMap);
View Full Code Here

TOP

Related Classes of org.data2semantics.proppred.kernels.rdfgraphkernels.RDFWLSubTreeKernel

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.