Examples of PosNegPrecisionRecall


Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

   
    PTA_computePrecisionRecall precRec = null;
   
    {
      precRec = new PTA_computePrecisionRecall(markovD);
      precRec.crossWith(walkEngine);PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      final String name = "Markov";
      System.out.println(name+": +precision "+result.getPosprecision()+" +recall: "+result.getPosrecall());
      System.out.println(name+": -precision "+result.getNegprecision()+" -recall: "+result.getNegrecall());
      System.out.println(name+": =precision "+result.getPrecision()+" =recall: "+result.getRecall());
    }

    {
      precRec = new PTA_computePrecisionRecall(edsm);
      precRec.crossWith(walkEngine);PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      final String name = "EDSM";
      System.out.println(name+": +precision "+result.getPosprecision()+" +recall: "+result.getPosrecall());
      System.out.println(name+": -precision "+result.getNegprecision()+" -recall: "+result.getNegrecall());
      System.out.println(name+": =precision "+result.getPrecision()+" =recall: "+result.getRecall());
    }
   
    linearDiff(cvsGraph, markov);
    linearDiff(cvsGraph, new LearnerGraphND(edsm,config));
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    specfsm = target;
  }

 
  public void trackResults(LearnerGraph graph) {
    PosNegPrecisionRecall pr = CompareGraphs.compare(tests, specfsm, graph);
    double accuracy = CompareGraphs.computeAccuracy(graph, specfsm, samples);
    ResultsContainer result = new ResultsContainer(accuracy, pr);
    currentResults.add(result);
   
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    specfsm = target;
  }

 
  public void trackResults(LearnerGraph graph) {
    PosNegPrecisionRecall pr = CompareGraphs.compare(tests, specfsm, graph);
    double accuracy = CompareGraphs.computeAccuracy(graph, specfsm, samples);
    ResultsContainer result = new ResultsContainer(accuracy, pr);
    currentResults.add(result);
   
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

      if (graph.paths.tracePath(neg, true) == AbstractOracle.USER_ACCEPTED)
        positiveRet.add(neg);
      else
        negativeRet.add(neg);

    return new PosNegPrecisionRecall(positiveRet, positiveRel, negativeRet, negativeRel);
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    for(int i=0;i < 12;++i)
      initSet = initSet.crossWithSet(alphabet);
   
    // Second, we run them on both graphs
   
    PosNegPrecisionRecall bruteForcePR = computePrecisionRecall(graph, sequences);
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(graph);
    precRec.crossWith(sequences);
    PosNegPrecisionRecall actualPR = precRec.getPosNegPrecisionRecallNum();
   
    // Third, we compare precision/recall computed in two different ways
   
    assertEquals("pos precision",bruteForcePR.getPosprecision(), actualPR.getPosprecision(),Configuration.fpAccuracy);
    assertEquals("pos recall",bruteForcePR.getPosrecall(), actualPR.getPosrecall(),Configuration.fpAccuracy);
    assertEquals("neg precision",bruteForcePR.getNegprecision(), actualPR.getNegprecision(),Configuration.fpAccuracy);
    assertEquals("neg recall",bruteForcePR.getNegrecall(), actualPR.getNegrecall(),Configuration.fpAccuracy);
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

  public static void compare(DirectedSparseGraph spec, DirectedSparseGraph imp){
    LearnerGraph specfsm =new LearnerGraph(spec, Configuration.getDefaultConfiguration());
    Visualiser v = new Visualiser(statechum.GlobalConfiguration.G_PROPERTIES.UPPER);
    v.construct(specfsm.pathroutines.getGraph());
    LearnerGraph wm = new LearnerGraph(imp,Configuration.getDefaultConfiguration());
    PosNegPrecisionRecall pr = compare(specfsm, wm);
    System.out.println(pr.getPosprecision()+", "+pr.getPosrecall()+", "+pr.getNegprecision()+", "+pr.getNegrecall());
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

      if (graph.paths.tracePath(neg, true) == AbstractOracle.USER_ACCEPTED)
        positiveRet.add(neg);
      else
        negativeRet.add(neg);

    return new PosNegPrecisionRecall(positiveRet, positiveRel, negativeRet, negativeRel);
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    for(int i=0;i < 12;++i)
      initSet = initSet.crossWithSet(alphabet);
   
    // Second, we run them on both graphs
   
    PosNegPrecisionRecall bruteForcePR = computePrecisionRecall(graph, sequences);
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(graph);
    precRec.crossWith(sequences);
    PosNegPrecisionRecall actualPR = precRec.getPosNegPrecisionRecallNum();
   
    // Third, we compare precision/recall computed in two different ways
   
    assertEquals("pos precision",bruteForcePR.getPosprecision(), actualPR.getPosprecision(),Configuration.fpAccuracy);
    assertEquals("pos recall",bruteForcePR.getPosrecall(), actualPR.getPosrecall(),Configuration.fpAccuracy);
    assertEquals("neg precision",bruteForcePR.getNegprecision(), actualPR.getNegprecision(),Configuration.fpAccuracy);
    assertEquals("neg recall",bruteForcePR.getNegrecall(), actualPR.getNegrecall(),Configuration.fpAccuracy);
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

      if (graph.paths.tracePath(neg, true) == AbstractOracle.USER_ACCEPTED)
        positiveRet.add(neg);
      else
        negativeRet.add(neg);

    return new PosNegPrecisionRecall(positiveRet, positiveRel, negativeRet, negativeRel);
  }
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    for(int i=0;i < 12;++i)
      initSet = initSet.crossWithSet(alphabet);
   
    // Second, we run them on both graphs
   
    PosNegPrecisionRecall bruteForcePR = computePrecisionRecall(graph, sequences);
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(graph);
    precRec.crossWith(sequences);
    PosNegPrecisionRecall actualPR = precRec.getPosNegPrecisionRecallNum();
   
    // Third, we compare precision/recall computed in two different ways
   
    assertEquals("pos precision",bruteForcePR.getPosprecision(), actualPR.getPosprecision(),Configuration.fpAccuracy);
    assertEquals("pos recall",bruteForcePR.getPosrecall(), actualPR.getPosrecall(),Configuration.fpAccuracy);
    assertEquals("neg precision",bruteForcePR.getNegprecision(), actualPR.getNegprecision(),Configuration.fpAccuracy);
    assertEquals("neg recall",bruteForcePR.getNegrecall(), actualPR.getNegrecall(),Configuration.fpAccuracy);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.