Package statechum.model.testset.PTASequenceEngine

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()


 
  public static PosNegPrecisionRecall compare(LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(specfsm.wmethod.getFullTestSet(1));
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
 
  public static PosNegPrecisionRecall compare(Collection<List<String>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
View Full Code Here


 
  public static PosNegPrecisionRecall compare(Collection<List<String>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(tests);
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
/*
  private static void printTests(Collection<List<String>> tests){
    for (List<String> list : tests) {
View Full Code Here

 
  public static PosNegPrecisionRecall compare(LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(specfsm.wmethod.getFullTestSet(1));
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
 
  public static PosNegPrecisionRecall compare(Collection<List<Label>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
View Full Code Here

 
  public static PosNegPrecisionRecall compare(Collection<List<Label>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(tests);
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
/*
  private static void printTests(Collection<List<String>> tests){
    for (List<String> list : tests) {
View Full Code Here

      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.
View Full Code Here

  public final void testPrecisionRecall5a() 
  {
    LearnerGraph mach = buildLearnerGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall5",mainConfiguration,converter);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b","a"}, // +, FN
      },mainConfiguration,converter));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",0, precComputer.resultTP);
View Full Code Here

  public final void testPrecisionRecall5b() 
  {
    LearnerGraph mach = buildLearnerGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall5",mainConfiguration,converter);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","a","b"}, // +, FN
      },mainConfiguration,converter));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",0, precComputer.resultTP);
View Full Code Here

  public final void testPrecisionRecall6() 
  {
    LearnerGraph mach = buildLearnerGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall6",mainConfiguration,converter);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b","a","c"}, // +, FN
      },mainConfiguration,converter));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",0, precComputer.resultTP);
View Full Code Here

  public final void testPrecisionRecall7() 
  {
    LearnerGraph mach = buildLearnerGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall6",mainConfiguration,converter);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b","a","d"}, // -
        new String[] {"a","a","a","b","a","e","f"}, // -
        new String[] {"a","a","a","b","a","c","c","c"}, // +, FN
      },mainConfiguration,converter));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
View Full Code Here

  public final void testPrecisionRecall8() 
  {
    LearnerGraph mach = buildLearnerGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall6",mainConfiguration,converter);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","a","a","b","c"}, // +
        new String[] {"a","b"}, // +
        new String[] {"a","a","a","b","c"}, // +
      },mainConfiguration,converter));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
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.