public void testUpdateMarkovSideways1b()
{
final LearnerGraph graph = FsmParser.buildLearnerGraph("A-a->B-a->C / B-b->C","testUpdateMarkovSideways1",config, converter);
MarkovModel m = new MarkovModel(2,false,true);
new MarkovClassifier(m,graph).updateMarkov(false);
Map<List<Label>,UpdatablePairInteger> mOccurrenceMatrix = m.computeOccurrenceMatrix();Map<List<Label>,MarkovOutcome> mPredictionsMatrix = m.computePredictionMatrix();
Assert.assertEquals(6,mPredictionsMatrix.size());
Assert.assertEquals(MarkovOutcome.positive,mPredictionsMatrix.get(Arrays.asList(new Label[]{lblA,lblA})));Assert.assertEquals(new UpdatablePairInteger(2, 0),mOccurrenceMatrix.get(Arrays.asList(new Label[]{lblA,lblA})));
Assert.assertEquals(MarkovOutcome.positive,mPredictionsMatrix.get(Arrays.asList(new Label[]{lblA,lblB})));Assert.assertEquals(new UpdatablePairInteger(1, 0),mOccurrenceMatrix.get(Arrays.asList(new Label[]{lblA,lblB})));
Assert.assertEquals(MarkovOutcome.positive,mPredictionsMatrix.get(Arrays.asList(new Label[]{lblB,lblA})));Assert.assertEquals(new UpdatablePairInteger(1, 0),mOccurrenceMatrix.get(Arrays.asList(new Label[]{lblB,lblA})));
Assert.assertEquals(MarkovOutcome.positive,mPredictionsMatrix.get(Arrays.asList(new Label[]{lblB,lblB})));Assert.assertEquals(new UpdatablePairInteger(1, 0),mOccurrenceMatrix.get(Arrays.asList(new Label[]{lblB,lblB})));