Package statechum.analysis.learning.MarkovUniversalLearner

Examples of statechum.analysis.learning.MarkovUniversalLearner.UpdatablePairInteger


    final LearnerGraph graph = FsmParser.buildLearnerGraph("A-a->B-a->C / B-b->C","testUpdateMarkovSideways1",config, converter);
    MarkovUniversalLearner m = new MarkovUniversalLearner(2);
    m.updateMarkov(graph,false,true);
    Assert.assertTrue(m.getMarkov(true).isEmpty());Assert.assertEquals(4,m.getMarkov(false).size());
    Assert.assertTrue(m.getOccurrence(true).isEmpty());Assert.assertEquals(4,m.getOccurrence(false).size());
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblA}),true)));Assert.assertEquals(new UpdatablePairInteger(2, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblA}),true)));
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblB}),true)));Assert.assertEquals(new UpdatablePairInteger(1, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblB}),true)));
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblA}),true)));Assert.assertEquals(new UpdatablePairInteger(1, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblA}),true)));
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblB}),true)));Assert.assertEquals(new UpdatablePairInteger(1, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblB}),true)));
  }
View Full Code Here


  {
    final LearnerGraph graph = FsmParser.buildLearnerGraph("A-a->B-a->C / B-b->C","testUpdateMarkovSideways1",config, converter);
    MarkovUniversalLearner m = new MarkovUniversalLearner(2);
    m.updateMarkov(graph,false,false);
    Assert.assertTrue(m.getMarkov(true).isEmpty());Assert.assertEquals(6,m.getMarkov(false).size());
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblA}),true)));Assert.assertEquals(new UpdatablePairInteger(2, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblA}),true)));
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblB}),true)));Assert.assertEquals(new UpdatablePairInteger(1, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblA,lblB}),true)));
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblA}),true)));Assert.assertEquals(new UpdatablePairInteger(1, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblA}),true)));
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblB}),true)));Assert.assertEquals(new UpdatablePairInteger(1, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblB,lblB}),true)));

    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblA}),true)));Assert.assertEquals(new UpdatablePairInteger(2, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblA}),true)));
    Assert.assertEquals(MarkovOutcome.positive,m.getMarkov(false).get(new Trace(Arrays.asList(new Label[]{lblB}),true)));Assert.assertEquals(new UpdatablePairInteger(1, 0),m.getOccurrence(false).get(new Trace(Arrays.asList(new Label[]{lblB}),true)));
  }
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.MarkovUniversalLearner.UpdatablePairInteger

Copyright © 2018 www.massapicom. 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.