Package org.encog.ml.hmm.train.kmeans

Examples of org.encog.ml.hmm.train.kmeans.TrainKMeans


    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);
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.hmm.train.kmeans.TrainKMeans

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.