@Test public void testModelLikelihood() { Matrix alpha = HmmAlgorithms.forwardAlgorithm(getModel(), getSequence(), false); Matrix beta = HmmAlgorithms.backwardAlgorithm(getModel(), getSequence(), false); double forwardLikelihood = HmmEvaluator.modelLikelihood(alpha, false); double backwardLikelihood = HmmEvaluator.modelLikelihood(getModel(), getSequence(), beta, false); assertEquals(forwardLikelihood, backwardLikelihood, EPSILON); assertEquals(1.8425e-4, forwardLikelihood, EPSILON); }
public static double modelLikelihood(HmmModel model, int[] outputSequence, boolean scaled) { return modelLikelihood(HmmAlgorithms.forwardAlgorithm(model, outputSequence, scaled), scaled); }
HmmEvaluator { public static double modelLikelihood(HmmModel model, int[] outputSequence, boolean scaled) { return modelLikelihood(HmmAlgorithms.forwardAlgorithm(model, outputSequence, scaled), scaled); } }
HmmEvaluator { public static double modelLikelihood(HmmModel model, int[] outputSequence, boolean scaled) { return modelLikelihood(HmmAlgorithms.forwardAlgorithm(model, outputSequence, scaled), scaled); } private  HmmEvaluator(); }
HmmEvaluator { public static double modelLikelihood(HmmModel model, int[] outputSequence, boolean scaled) { return modelLikelihood(HmmAlgorithms.forwardAlgorithm(model, outputSequence, scaled), scaled); } private  HmmEvaluator(); static int[] predict(HmmModel model, int steps); static int[] predict(HmmModel model, int steps, long seed); static double modelLikelihood(HmmModel model, int[] outputSequence, boolean scaled); static double modelLikelihood(Matrix alpha, boolean scaled); static double modelLikelihood(HmmModel model, int[] outputSequence, Matrix beta, boolean scaled); static int[] decode(HmmModel model, int[] observations, boolean scaled); }
HmmEvaluator { public static double modelLikelihood(HmmModel model, int[] outputSequence, boolean scaled) { return modelLikelihood(HmmAlgorithms.forwardAlgorithm(model, outputSequence, scaled), scaled); } private  HmmEvaluator(); static int[] predict(HmmModel model, int steps); static int[] predict(HmmModel model, int steps, long seed); static double modelLikelihood(HmmModel model, int[] outputSequence, boolean scaled); static double modelLikelihood(Matrix alpha, boolean scaled); static double modelLikelihood(HmmModel model, int[] outputSequence, Matrix beta, boolean scaled); static int[] decode(HmmModel model, int[] observations, boolean scaled);  }