Package be.ac.ulg.montefiore.run.jahmm.toolbox

Examples of be.ac.ulg.montefiore.run.jahmm.toolbox.KullbackLeiblerDistanceCalculator


   
    sequences = new ArrayList<List<ObservationInteger>>();   
    for (int i = 0; i < 100; i++)
      sequences.add(mg.observationSequence(100));
   
    klc = new KullbackLeiblerDistanceCalculator();
  }
View Full Code Here


    BaumWelchLearner bwl = new BaumWelchLearner();
   
    Hmm<ObservationDiscrete<Packet>> learntHmm = buildInitHmm();
   
    // This object measures the distance between two HMMs
    KullbackLeiblerDistanceCalculator klc =
      new KullbackLeiblerDistanceCalculator();
   
    // Incrementally improve the solution
    for (int i = 0; i < 10; i++) {
      System.out.println("Distance at iteration " + i + ": " +
          klc.distance(learntHmm, hmm));
      learntHmm = bwl.iterate(learntHmm, sequences);
    }
   
    System.out.println("Resulting HMM:\n" + learntHmm);
   
View Full Code Here

  throws IOException, FileFormatException
  {
    Hmm<O> hmm1 = HmmReader.read(reader1, relatedObjs.opdfReader());
    Hmm<O> hmm2 = HmmReader.read(reader2, relatedObjs.opdfReader());
   
    KullbackLeiblerDistanceCalculator kl =
      new KullbackLeiblerDistanceCalculator();
    System.out.println(kl.distance(hmm1, hmm2));
  }
View Full Code Here

TOP

Related Classes of be.ac.ulg.montefiore.run.jahmm.toolbox.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.