List<VarDistribution> results = rainmanHmm
.forward_backward(perceptions);
Assert.assertEquals(4, results.size());
Assert.assertNull(results.get(0));
VarDistribution smoothedDayOne = results.get(1);
Assert.assertEquals(0.861,
smoothedDayOne.getProbabilityOf(HmmConstants.RAINING),
TOLERANCE);
Assert.assertEquals(0.138,
smoothedDayOne.getProbabilityOf(HmmConstants.NOT_RAINING),
TOLERANCE);
VarDistribution smoothedDayTwo = results.get(2);
Assert.assertEquals(0.799,
smoothedDayTwo.getProbabilityOf(HmmConstants.RAINING),
TOLERANCE);
Assert.assertEquals(0.201,
smoothedDayTwo.getProbabilityOf(HmmConstants.NOT_RAINING),
TOLERANCE);
VarDistribution smoothedDayThree = results.get(3);
Assert.assertEquals(0.190,
smoothedDayThree.getProbabilityOf(HmmConstants.RAINING),
TOLERANCE);
Assert.assertEquals(0.810,
smoothedDayThree.getProbabilityOf(HmmConstants.NOT_RAINING),
TOLERANCE);
}