@SuppressWarnings("unused") final Object [] moreOptions)
{
return new Pair<Integer,String>(graph.paths.tracePath(question),null);
}
};
PTASequenceEngine sPlus = null, sMinus = null;int percent = 10;
sPlus = rpg.getExtraSequences(percent/10-1);sMinus = rpg.getAllSequences(percent/10-1);
int ptaSize = sMinus.numberOfLeafNodes();
l.init(sMinus, ptaSize,ptaSize);// our imaginary positives are prefixes of negatives.
DirectedSparseGraph learningOutcome = l.learnMachine();
l.setQuestionCounter(0);
LearnerGraph learned = new LearnerGraph(learningOutcome,config);
PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(learned);
PTASequenceEngine engine = new PTA_FSMStructure(graph);
precRec.crossWith(sMinus);
SequenceSet ptaTestSet = engine.new SequenceSet();ptaTestSet.setIdentity();
ptaTestSet = ptaTestSet.cross(graph.wmethod.getFullTestSet(1));
PosNegPrecisionRecall prNeg = precRec.crossWith(engine);
System.out.println("pre: "+prNeg.getPrecision()+" rec: "+prNeg.getRecall());