Examples of MarkovModel


Examples of statechum.analysis.learning.MarkovModel

 
  @Test
  public void testMarkovPerformance1()
  {
    final LearnerGraph trainingGraph = FsmParser.buildLearnerGraph("A-a->B-b->C / B-u-#D / A-c->E-u->F / E-c->G","testUpdateMarkovSideways3",config, converter);
    MarkovModel m = new MarkovModel(2,true,true);
    MarkovClassifier cl=new MarkovClassifier(m,trainingGraph);cl.updateMarkov(false);
    statechum.Pair<Double,Double> pairTraining = cl.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(2./3,pairTraining.firstElem,Configuration.fpAccuracy);// reflects that transitions u and c from G are not present but predicted
    Assert.assertEquals(2./3.,pairTraining.secondElem,Configuration.fpAccuracy);// reflects that transitions a and c are not predicted but present.
   
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.