Package org.encog.ml.hmm.alog

Examples of org.encog.ml.hmm.alog.KullbackLeiblerDistanceCalculator


    return hmm;
  }
 
  public void validate(HiddenMarkovModel result, HiddenMarkovModel source)
  {
    KullbackLeiblerDistanceCalculator klc =
        new KullbackLeiblerDistanceCalculator();
         
      double e = klc.distance(result, source);
      Assert.assertTrue(e<0.01);
  }
View Full Code Here


    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

    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

   
    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.alog.KullbackLeiblerDistanceCalculator

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.