Examples of predictTransitions()


Examples of statechum.analysis.learning.MarkovUniversalLearner.predictTransitions()

    m.updateMarkov(graph,true,true);
    Assert.assertEquals(4,m.getMarkov(true).size());
    Assert.assertTrue(m.getMarkov(false).isEmpty());
   
    final LearnerGraph graph2 = FsmParser.buildLearnerGraph("A-a->B / A-c->A/ T-u->T-b->T","testPredictTransitionsFromStatesForward2",config, converter);
    Map<CmpVertex, Map<Label, MarkovOutcome>> predictions = m.predictTransitions(graph2,true);
    Assert.assertEquals(2,predictions.size());Assert.assertEquals(2,predictions.get(graph2.findVertex("A")).size());Assert.assertEquals(2,predictions.get(graph2.findVertex("B")).size());
    Assert.assertEquals(MarkovOutcome.positive,predictions.get(graph2.findVertex("A")).get(lblU));// because c is looping in the A state
    Assert.assertEquals(MarkovOutcome.positive,predictions.get(graph2.findVertex("A")).get(lblC));
    Assert.assertEquals(MarkovOutcome.negative,predictions.get(graph2.findVertex("B")).get(lblU));
    Assert.assertEquals(MarkovOutcome.positive,predictions.get(graph2.findVertex("B")).get(lblB));
View Full Code Here

Examples of statechum.analysis.learning.MarkovUniversalLearner.predictTransitions()

    m.updateMarkov(graph,true,true);
    Assert.assertEquals(4,m.getMarkov(true).size());
    Assert.assertTrue(m.getMarkov(false).isEmpty());
   
    final LearnerGraph graph2 = new LearnerGraph(config);graph2.getInit().setAccept(false);
    Map<CmpVertex, Map<Label, MarkovOutcome>> predictions = m.predictTransitions(graph2,true);
    Assert.assertTrue(predictions.isEmpty());
    predictions = m.predictTransitions(graph2,false);
    Assert.assertTrue(predictions.isEmpty());
  }
 
View Full Code Here

Examples of statechum.analysis.learning.MarkovUniversalLearner.predictTransitions()

    Assert.assertTrue(m.getMarkov(false).isEmpty());
   
    final LearnerGraph graph2 = new LearnerGraph(config);graph2.getInit().setAccept(false);
    Map<CmpVertex, Map<Label, MarkovOutcome>> predictions = m.predictTransitions(graph2,true);
    Assert.assertTrue(predictions.isEmpty());
    predictions = m.predictTransitions(graph2,false);
    Assert.assertTrue(predictions.isEmpty());
  }
 
  @Test
  public void testPredictTransitionsFromStatesForward3()
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.