@Test
public void testScaledModelLikelihood() {

  // compute alpha and beta values
  Matrix alpha = HmmAlgorithms.forwardAlgorithm(getModel(), getSequence(), true);
  Matrix beta = HmmAlgorithms.backwardAlgorithm(getModel(), getSequence(), true);
  // now test whether forward == backward likelihood
  double forwardLikelihood = HmmEvaluator.modelLikelihood(alpha, true);
  double backwardLikelihood = HmmEvaluator.modelLikelihood(getModel(), getSequence(),
      beta, true);
  assertEquals(forwardLikelihood, backwardLikelihood, EPSILON);
  // also make sure that the likelihood matches the expected one
  assertEquals(1.8425e-4, forwardLikelihood, EPSILON);
}