Package org.data2semantics.proppred.learners.libsvm

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


    int depth = 3;
    int iteration = 6;
    boolean inference = true;

    LibSVMParameters parms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
    ResultsTable resTable = new ResultsTable();

    resTable.newRow("WL RDF");
    for (double frac : fractions) {
View Full Code Here


    int[] iterations = {0, 2, 4, 6};

    createAffiliationPredictionDataSet(1);


    LibSVMParameters parms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
    //parms.setEvalFunction(LibSVMParameters.F1);

    ResultsTable resTable = new ResultsTable();

   
View Full Code Here

    //int[] iterations2 = {0,2,4,6,8,10,12,14,16,18,20};
    int[] iterations  = {0,1,2,3,4,5};
    int[] iterations2 = {0,2,4,6,8,10};


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

    LibLINEARParameters linParms = new LibLINEARParameters(LibLINEARParameters.SVC_DUAL, cs);
    linParms.setNumFolds(5);
    linParms.setSplitFraction((float) 0.7);
    linParms.setDoCrossValidation(false);
View Full Code Here

    int depth = 3;
    int iteration = 6;
    boolean inference = true;

    LibSVMParameters parms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
    ResultsTable resTable = new ResultsTable();

    resTable.newRow("WL RDF");
    for (double frac : fractions) {
View Full Code Here

    int depth = 3;
    int[] iterations = {0, 2, 4, 6};

    dataset = new RDFFileDataSet(dataDir, RDFFormat.NTRIPLES);

    LibSVMParameters parms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);

    ResultsTable resTable = new ResultsTable();
    resTable.setManWU(0.05);

    boolean inference = false;
View Full Code Here

    dataset = new RDFFileDataSet(dataDir, RDFFormat.NTRIPLES);
    createGeoDataSet(1, 1, "http://data.bgs.ac.uk/ref/Lexicon/hasLithogenesis");


    LibSVMParameters parms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
    //parms.setEvalFunction(LibSVM.F1);

    ResultsTable resTable = new ResultsTable();
    resTable.setDigits(2);
View Full Code Here

    evalFuncs.add(new Error());
    evalFuncs.add(new F1());

    List<Double> target = EvaluationUtils.createTarget(labels);

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

    svmParms.setWeightLabels(EvaluationUtils.computeWeightLabels(target));
    svmParms.setWeights(EvaluationUtils.computeWeights(target));
    //---------

    //---------
    // Results Table
    ResultsTable resTable = new ResultsTable();
View Full Code Here

      weights[(int) label - 1] = 1 / counts.get(label);
    }
    linParms.setWeightLabels(wLabels);
    linParms.setWeights(weights);

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

    svmParms.setWeightLabels(EvaluationUtils.computeWeightLabels(target));
    svmParms.setWeights(EvaluationUtils.computeWeights(target));

    ResultsTable resTable = new ResultsTable();
    resTable.setDigits(2);

    List<Statement> allStmts = dataset.getStatements(null, null, null, inference);
View Full Code Here

    for (int i : depths) {     
      for (int it : iterations) {
        resTable.newRow("");
       
       
        LibSVMParameters parms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
        KernelExperiment<RDFGraphKernel> exp = new RDFOldKernelExperiment(new RDFWLSubTreeKernel(it, i, inference, true), seeds, parms, dataset, instances, labels, blackList);
       
        System.out.println("Running WL RDF: " + i + " " + it);
        exp.run();
       
View Full Code Here

    evalFuncs.add(new Error());
    evalFuncs.add(new F1());

    List<Double> target = EvaluationUtils.createTarget(labels);

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

    svmParms.setWeightLabels(EvaluationUtils.computeWeightLabels(target));
    svmParms.setWeights(EvaluationUtils.computeWeights(target));
    //---------



    //-------
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.