HiddenMarkovModel hmm = new HiddenMarkovModel(2,2);
hmm.setPi(0, 0.50);
hmm.setPi(1, 0.50);
hmm.setStateDistribution(0, new DiscreteDistribution(new double[][] { { 0.8, 0.2 } }));
hmm.setStateDistribution(1, new DiscreteDistribution(new double[][] { { 0.1, 0.9 } }));
hmm.setTransitionProbability(0, 1, 0.2);
hmm.setTransitionProbability(0, 0, 0.8);
hmm.setTransitionProbability(1, 0, 0.2);
hmm.setTransitionProbability(1, 1, 0.8);