Package org.encog.ml.hmm.train.bw

Examples of org.encog.ml.hmm.train.bw.TrainBaumWelch


    HiddenMarkovModel learntHmm = buildDiscInitHMM();
   
    MarkovGenerator mg = new MarkovGenerator(hmm);
    MLSequenceSet training = mg.generateSequences(200,100);
   
    TrainBaumWelch bwl = new TrainBaumWelch(learntHmm,training);
   
    KullbackLeiblerDistanceCalculator klc =
      new KullbackLeiblerDistanceCalculator();
   
    bwl.iteration(5);
   
    learntHmm = (HiddenMarkovModel)bwl.getMethod();
   
    double e = klc.distance(learntHmm, hmm);
    Assert.assertTrue(e<0.01);
  }
View Full Code Here


    HiddenMarkovModel learntHmm = buildContInitHMM();
   
    MarkovGenerator mg = new MarkovGenerator(hmm);
    MLSequenceSet training = mg.generateSequences(200,100);
   
    TrainBaumWelch bwl = new TrainBaumWelch(learntHmm,training);
   
    KullbackLeiblerDistanceCalculator klc =
      new KullbackLeiblerDistanceCalculator();
   
    bwl.iteration(5);
    learntHmm = (HiddenMarkovModel)bwl.getMethod();
   
    double e = klc.distance(learntHmm, hmm);
    Assert.assertTrue(e<0.01);
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.hmm.train.bw.TrainBaumWelch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.