Package org.data2semantics.proppred.learners.evaluation

Examples of org.data2semantics.proppred.learners.evaluation.F1


  @Main
  public void mainKernelMethod(){
   
    List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();
    evalFuncs.add(new Accuracy());
    evalFuncs.add(new F1());
    long[] seeds2={seed};
    System.out.println(dataset + " " + labels.size() + " " + instances.size() + " " + blackList.size());
   
    RDFLinearKernelExperiment exp = new RDFLinearKernelExperiment(new RDFWLSubTreeKernel(iteration, depth, true, true), seeds2, linParms, dataset, instances, target, blackList, evalFuncs);
   
View Full Code Here


    // --------------
    // Learning Algorithm settings
    List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();
    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);
View Full Code Here

    boolean tfidf = false;
    boolean normalize = true;
   
    List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();
    evalFuncs.add(new Accuracy());
    evalFuncs.add(new F1());
    List<Double> targets = EvaluationUtils.createTarget(labels);

    LibLINEARParameters linParms = new LibLINEARParameters(LibLINEARParameters.SVC_DUAL, cs);
    linParms.setEvalFunction(new Accuracy());
    linParms.setDoCrossValidation(true);
View Full Code Here

    boolean inference = false;
         

    List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();
    evalFuncs.add(new Accuracy());
    evalFuncs.add(new F1());

    for (double frac : fractions) {
      createGeoDataSet((int)(1000 * frac), frac, seed, "http://data.bgs.ac.uk/ref/Lexicon/hasTheme");
      List<Double> target = EvaluationUtils.createTarget(labels);
     
View Full Code Here

    dataset = new RDFFileDataSet("datasets\\Stadsverkeer.ttl", RDFFormat.TURTLE);

    List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();
    evalFuncs.add(new Accuracy());
    evalFuncs.add(new F1());




    ResultsTable resTable = new ResultsTable();
View Full Code Here

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


    List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();
    evalFuncs.add(new Accuracy());
    evalFuncs.add(new F1());

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

View Full Code Here

   
    // 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));
    System.out.println("F1:  " + (new F1()).computeScore(EvaluationUtils.target2Doubles(target), pred));
   
  }
View Full Code Here

TOP

Related Classes of org.data2semantics.proppred.learners.evaluation.F1

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.