HiddenMarkovModel hmm = buildDiscHMM();
MarkovGenerator mg = new MarkovGenerator(hmm);
MLSequenceSet sequences = mg.generateSequences(200,100);
TrainKMeans trainer = new TrainKMeans(hmm,sequences);
HiddenMarkovModel learntHmm = buildDiscInitHMM();
KullbackLeiblerDistanceCalculator klc =
new KullbackLeiblerDistanceCalculator();
trainer.iteration(5);
learntHmm = (HiddenMarkovModel)trainer.getMethod();
double e = klc.distance(learntHmm, hmm);
Assert.assertTrue(e<0.05);
}