public static void forwardBackWardDemo() {
System.out.println("\nForward BackWard Demo\n");
HiddenMarkovModel rainmanHmm = HMMFactory.createRainmanHMM();
System.out
.println("Creating a Hdden Markov Model to represent the model in Fig 15.5 ");
List<String> perceptions = new ArrayList<String>();
perceptions.add(HmmConstants.SEE_UMBRELLA);
perceptions.add(HmmConstants.SEE_UMBRELLA);
List<VarDistribution> results = rainmanHmm
.forward_backward(perceptions);
VarDistribution smoothedDayOne = results.get(1);
System.out.println("Smoothed Probability Of Raining on Day One = "
+ smoothedDayOne.getProbabilityOf(HmmConstants.RAINING));