Examples of PTA_computePrecisionRecall


Examples of statechum.model.testset.PTA_computePrecisionRecall

    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"}, // +
      },config));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
   
    engine = new PTA_FSMStructure(mach,null);
    partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b"}, // +
      },config));
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",1, precComputer.resultTP);
    assertEquals("false negatives",0, precComputer.resultFN);assertEquals("false positives",0, precComputer.resultFP);
    assertEquals("positives relevant",1, precComputer.pos_Rel);assertEquals("negatives relevant",0, precComputer.neg_Rel);
    assertEquals("positives retrieved",1, precComputer.pos_Ret);assertEquals("negatives retrieved",0, precComputer.neg_Ret);
  }
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.