PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
new String[] {"a","b","b","c","c","c","c"}, // +
},mainConfiguration,converter));
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","b","b","c","c"}, // +, FN
},mainConfiguration,converter));
precComputer.crossWith(engine);
assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",0, precComputer.resultTP);
assertEquals("false negatives",1, 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",0, precComputer.pos_Ret);assertEquals("negatives retrieved",1, precComputer.neg_Ret);
}