Package org.data2semantics.proppred.learners.libsvm

Examples of org.data2semantics.proppred.learners.libsvm.LibSVMParameters


    System.out.println(resTable);
   
    for (int i : depths) {     
      resTable.newRow("");

      LibSVMParameters svmParms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
   
      KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFIntersectionSubTreeKernel(i, 1, inference, true), seeds, svmParms, dataset, instances, labels, blackList);

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


   
    // 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));
    parms.setWeights(EvaluationUtils.computeWeights(target));
   
    // For simplicity we do CV, but kernel can also be split in train/test split, which is slightly more involved.
    Prediction[] pred = LibSVM.crossValidate(matrix, EvaluationUtils.target2Doubles(target), parms, 5);

    System.out.println("Acc: " + (new Accuracy()).computeScore(EvaluationUtils.target2Doubles(target), pred));
View Full Code Here

    this(kernel, extractionDepth);
    this.params = params;
  }
 
  private void setDefaultLibSVMParams() {
    this.params = new LibSVMParameters(LibSVMParameters.C_SVC);
    double[] cs = {0.001, 0.01, 0.1, 1.0, 10, 100, 1000};
    this.params.setItParams(cs);
  }
View Full Code Here

TOP

Related Classes of org.data2semantics.proppred.learners.libsvm.LibSVMParameters

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.