Package ivory.core.eval

Examples of ivory.core.eval.GradedQrels


    if (qrelsPath == null){
      System.out.println("Should have set qrelsPath!");
      System.exit(-1);
    }

    GradedQrels qrels = new GradedQrels(qrelsPath);
                DocnoMapping mapping = getDocnoMapping();

    if (K_val==0){
      //System.out.println("K value should be set already.");
      //System.exit(-1);
    }
    for (String queryID : queries.keySet()) {
      // Get the ranked list for this query.
      Accumulator[] list = runner.getResults(queryID);
      if (list == null) {
        LOG.info("null results for: " + queryID);
        continue;
      }

      float ndcg = (float) RankedListEvaluator.computeNDCG(kVal, list, mapping, qrels.getReldocsForQid(queryID, true));
      ndcgSum += ndcg;

      if (!internalDocno){
        if (qrels.getReldocsForQid(queryID, true).size()>0){ //if have qrels for this query
          //System.out.println("Lidan: NDCG for query "+queryID+" is "+ndcg);
          ndcgValues.add(ndcg+"");
          costKeys.add(modelID+" "+queryID); //save keys for cost. Evaluation metric is computed by the end of runQueries()
        }
      }
View Full Code Here


    g.put("Gov2-Cascade-0.7", new GroundTruth("Gov2-Cascade-0.7", Metric.NDCG20, 75, p7, 0.4625f));
    g.put("Gov2-Cascade-0.5", new GroundTruth("Gov2-Cascade-0.5", Metric.NDCG20, 75, p5, 0.4634f));
    g.put("Gov2-Cascade-0.3", new GroundTruth("Gov2-Cascade-0.3", Metric.NDCG20, 75, p3, 0.4653f));
    g.put("Gov2-Cascade-0.1", new GroundTruth("Gov2-Cascade-0.1", Metric.NDCG20, 75, p1, 0.4745f));

    GradedQrels qrels = new GradedQrels("data/gov2/qrels.gov2.all");

    String[] params = new String[] {
        "data/gov2/run.gov2.SIGIR2011.varying.tradeoff.cascade.xml",
        "data/gov2/gov2.title.776-850" };
View Full Code Here

    g.put("Gov2-FeaturePrune-0.3",
        new GroundTruth("Gov2-FeaturePrune-0.3", Metric.NDCG20, 75, p3, 0.4661f));
    g.put("Gov2-FeaturePrune-0.1",
        new GroundTruth("Gov2-FeaturePrune-0.1", Metric.NDCG20, 75, p1, 0.4716f));

    GradedQrels qrels = new GradedQrels("data/gov2/qrels.gov2.all");

    String[] params = new String[] {
        "data/gov2/run.gov2.SIGIR2011.varying.tradeoff.featureprune.xml",
        "data/gov2/gov2.title.776-850" };
View Full Code Here

    g.put("Gov2-Cascade", new GroundTruth("Gov2-Cascade", Metric.NDCG20, 75, Cascade, 0.4744f));
    g.put("Gov2-AdaRank", new GroundTruth("Gov2-AdaRank", Metric.NDCG20, 75, AdaRank, 0.4737f));
    g.put("Gov2-FeaturePrune", new GroundTruth("Gov2-FeaturePrune", Metric.NDCG20, 75,
        FeaturePrune, 0.4716f));

    GradedQrels qrels = new GradedQrels("data/gov2/qrels.gov2.all");

    String[] params = new String[] {
        "data/gov2/run.gov2.SIGIR2011.xml",
        "data/gov2/gov2.title.776-850" };
View Full Code Here

TOP

Related Classes of ivory.core.eval.GradedQrels

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.