{0.0004390858, 0.007076994, 0.01063512, 0.013556, 0.0304, 0.17, 1}};
// fetch the beta matrix using the backward algorithm
Matrix beta = HmmAlgorithms.backwardAlgorithm(getModel(), getSequence(), false);
// first do some basic checking
assertNotNull(beta);
assertEquals(4, beta.numCols());
assertEquals(7, beta.numRows());
// now compare the resulting matrices
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 7; ++j) {
assertEquals(betaExpectedA[i][j], beta.get(j, i), EPSILON);