Examples of evaluateCorrectnessOfMarkov()


Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

  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.
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-t->B","testMarkovPerformance1a",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    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.
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-t->B","testMarkovPerformance1a",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pair.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pair.secondElem,Configuration.fpAccuracy);

    MarkovClassifier evalB = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B","testMarkovPerformance1b",config, converter));
    statechum.Pair<Double,Double> pairB = evalB.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pairB.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pairB.secondElem,Configuration.fpAccuracy);
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-t->B","testMarkovPerformance1a",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pair.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pair.secondElem,Configuration.fpAccuracy);

    MarkovClassifier evalB = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B","testMarkovPerformance1b",config, converter));
    statechum.Pair<Double,Double> pairB = evalB.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pairB.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pairB.secondElem,Configuration.fpAccuracy);
  }
 
  @Test
  public void testMarkovPerformance2()
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    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);
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B-u-#D / B-b->G","testMarkovPerformance2",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(1,pair.firstElem,Configuration.fpAccuracy);Assert.assertEquals(2./3,pair.secondElem,Configuration.fpAccuracy);// transition a is not predicted
  }
 
  @Test
  public void testMarkovPerformance3()
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    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);
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B-u-#D / B-b->G / B-e->Z","testMarkovPerformance3",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(1,pair.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0.5,pair.secondElem,Configuration.fpAccuracy);// transition a is not predicted
  }
 
  @Test
  public void testMarkovPerformance4()
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    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);
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B-b->C-c->D-u->E","testMarkovPerformance4",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(3./4,pair.firstElem,Configuration.fpAccuracy);// u is predicted as negative and is indeed missing, b is correctly predicted as a positive; u after c is correctly predicted as positive and c after c is not correctly predicted.
    Assert.assertEquals(0.5,pair.secondElem,Configuration.fpAccuracy);// transition a is not predicted
  }
 
  @Test
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    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);
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B-b->G","testMarkovPerformance5",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(1,pair.firstElem,Configuration.fpAccuracy);// u is predicted as negative and is indeed missing, b is correctly predicted as a positive
    Assert.assertEquals(0.5,pair.secondElem,Configuration.fpAccuracy);// transition a is not predicted
  }
 
}
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

  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.
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-t->B","testMarkovPerformance1a",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    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.
   
    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-t->B","testMarkovPerformance1a",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pair.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pair.secondElem,Configuration.fpAccuracy);

    MarkovClassifier evalB = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B","testMarkovPerformance1b",config, converter));
    statechum.Pair<Double,Double> pairB = evalB.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pairB.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pairB.secondElem,Configuration.fpAccuracy);
View Full Code Here

Examples of statechum.analysis.learning.MarkovClassifier.evaluateCorrectnessOfMarkov()

    MarkovClassifier eval = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-t->B","testMarkovPerformance1a",config, converter));
    statechum.Pair<Double,Double> pair = eval.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pair.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pair.secondElem,Configuration.fpAccuracy);

    MarkovClassifier evalB = new MarkovClassifier(m,FsmParser.buildLearnerGraph("A-a->B","testMarkovPerformance1b",config, converter));
    statechum.Pair<Double,Double> pairB = evalB.evaluateCorrectnessOfMarkov();
    Assert.assertEquals(0,pairB.firstElem,Configuration.fpAccuracy);Assert.assertEquals(0,pairB.secondElem,Configuration.fpAccuracy);
  }
 
  @Test
  public void testMarkovPerformance2()
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.