Examples of computePredictionMatrix()


Examples of statechum.analysis.learning.MarkovModel.computePredictionMatrix()

   
    Set<List<Label>> plusStrings = buildSet(new String[][] {},config,converter), minusStrings = buildSet(new String[][] { new String[]{"a","a","a"},new String[]{"a","b","a"},new String[]{"a","c"} },config,converter);
    MarkovModel another = new MarkovModel(2,true,true);
    another.createMarkovLearner(plusStrings, minusStrings, false);

    Map<List<Label>,MarkovOutcome> anotherPredictionsMatrix = another.computePredictionMatrix();
    Assert.assertEquals(7,anotherPredictionsMatrix.size());
    Assert.assertEquals(MarkovOutcome.failure,anotherPredictionsMatrix.get(Arrays.asList(new Label[]{lblA,lblA})));
    Assert.assertEquals(MarkovOutcome.positive,anotherPredictionsMatrix.get(Arrays.asList(new Label[]{lblA,lblB})));
    Assert.assertEquals(MarkovOutcome.negative,anotherPredictionsMatrix.get(Arrays.asList(new Label[]{lblA,lblC})));
    Assert.assertEquals(MarkovOutcome.negative,anotherPredictionsMatrix.get(Arrays.asList(new Label[]{lblB,lblA})));
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.