Examples of PosNegPrecisionRecall


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(0);
    v.construct(specfsm.pathroutines.getGraph(),null);
    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

    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

  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(),null);
    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

  public static void compare(DirectedSparseGraph spec, DirectedSparseGraph imp){
    LearnerGraph specfsm =new LearnerGraph(spec, Configuration.getDefaultConfiguration());
    Visualiser v = new Visualiser(0);
    v.construct(specfsm.pathroutines.getGraph(),null);   
    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

      sPlus = rpg.getExtraSequences(percent/10-1);sMinus = rpg.getAllSequences(percent/10-1);

      LearnerGraph learnt = learn(l,sMinus);
      PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(learnt);
      PTASequenceEngine engine = new PTA_FSMStructure(graph,null);
      precRec.crossWith(sMinus);PosNegPrecisionRecall ptaPR = precRec.getPosNegPrecisionRecallNum();
      SequenceSet ptaTestSet = engine.new SequenceSet();ptaTestSet.setIdentity();
      ptaTestSet = ptaTestSet.cross(graph.wmethod.getFullTestSet(1));
      precRec.crossWith(engine);PosNegPrecisionRecall prNeg = precRec.getPosNegPrecisionRecallNum();
     
      assert questionNumber.get() == l.getQuestionCounter();
     
      // Column 0 is the name of the learner.
      // Columns 3 and 4
      result = result+prNeg.getPrecision()+FS+prNeg.getRecall();
     
      result = result + FS + questionNumber+ FS + // 5
        // Columns 6 and 7
        ptaPR.getPrecision()  + FS + ptaPR.getRecall() + FS +
        "size:"+size+FS+ // 8
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    */
    PTA_computePrecisionRecall precRec = null;
   
    {
      precRec = new PTA_computePrecisionRecall(markovD);
      precRec.crossWith(generator.getAllSequences(0));PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      System.out.println("Markov: precision "+result.getPosprecision()+" recall: "+result.getPosrecall());
    }

    {
      precRec = new PTA_computePrecisionRecall(edsm);
      precRec.crossWith(generator.getAllSequences(0));PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      System.out.println("EDSM: precision "+result.getPosprecision()+" recall: "+result.getPosrecall());
    }
   
    //Visualiser.updateFrame(edsm, null);
    //Visualiser.waitForKey();
    //linearDiff(cvsGraph, markov);
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

      sPlus = rpg.getExtraSequences(percent/10-1);sMinus = rpg.getAllSequences(percent/10-1);

      LearnerGraph learnt = learn(l,sMinus);
      PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(learnt);
      PTASequenceEngine engine = new PTA_FSMStructure(graph,null);
      precRec.crossWith(sMinus);PosNegPrecisionRecall ptaPR = precRec.getPosNegPrecisionRecallNum();
      SequenceSet ptaTestSet = engine.new SequenceSet();ptaTestSet.setIdentity();
      ptaTestSet = ptaTestSet.cross(graph.wmethod.getFullTestSet(1));
      precRec.crossWith(engine);PosNegPrecisionRecall prNeg = precRec.getPosNegPrecisionRecallNum();
     
      assert questionNumber.get() == l.getQuestionCounter();
     
      // Column 0 is the name of the learner.
      // Columns 3 and 4
      result = result+prNeg.getPrecision()+FS+prNeg.getRecall();
     
      result = result + FS + questionNumber+ FS + // 5
        // Columns 6 and 7
        ptaPR.getPrecision()  + FS + ptaPR.getRecall() + FS +
        "size:"+size+FS+ // 8
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    */
    PTA_computePrecisionRecall precRec = null;
   
    {
      precRec = new PTA_computePrecisionRecall(markovD);
      precRec.crossWith(generator.getAllSequences(0));PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      System.out.println("Markov: precision "+result.getPosprecision()+" recall: "+result.getPosrecall());
    }

    {
      precRec = new PTA_computePrecisionRecall(edsm);
      precRec.crossWith(generator.getAllSequences(0));PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      System.out.println("EDSM: precision "+result.getPosprecision()+" recall: "+result.getPosrecall());
    }
   
    //Visualiser.updateFrame(edsm, null);
    //Visualiser.waitForKey();
    //linearDiff(cvsGraph, markov);
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

      sPlus = rpg.getExtraSequences(percent/10-1);sMinus = rpg.getAllSequences(percent/10-1);

      LearnerGraph learnt = learn(l,sMinus);
      PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(learnt);
      PTASequenceEngine engine = new PTA_FSMStructure(graph,null);
      precRec.crossWith(sMinus);PosNegPrecisionRecall ptaPR = precRec.getPosNegPrecisionRecallNum();
      SequenceSet ptaTestSet = engine.new SequenceSet();ptaTestSet.setIdentity();
      ptaTestSet = ptaTestSet.cross(graph.wmethod.getFullTestSet(1));
      precRec.crossWith(engine);PosNegPrecisionRecall prNeg = precRec.getPosNegPrecisionRecallNum();
     
      assert questionNumber.get() == l.getQuestionCounter();
     
      // Column 0 is the name of the learner.
      // Columns 3 and 4
      result = result+prNeg.getPrecision()+FS+prNeg.getRecall();
     
      result = result + FS + questionNumber+ FS + // 5
        // Columns 6 and 7
        ptaPR.getPrecision()  + FS + ptaPR.getRecall() + FS +
        "size:"+size+FS+ // 8
View Full Code Here

Examples of statechum.analysis.learning.PrecisionRecall.PosNegPrecisionRecall

    */
    PTA_computePrecisionRecall precRec = null;
   
    {
      precRec = new PTA_computePrecisionRecall(markovD);
      precRec.crossWith(generator.getAllSequences(0));PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      System.out.println("Markov: precision "+result.getPosprecision()+" recall: "+result.getPosrecall());
    }

    {
      precRec = new PTA_computePrecisionRecall(edsm);
      precRec.crossWith(generator.getAllSequences(0));PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      System.out.println("EDSM: precision "+result.getPosprecision()+" recall: "+result.getPosrecall());
    }
   
    //Visualiser.updateFrame(edsm, null);
    //Visualiser.waitForKey();
    //linearDiff(cvsGraph, markov);
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.