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

Examples of be.ac.ulg.montefiore.run.jahmm.learn.BaumWelchLearner


    List<List<O>> seqs = relatedObjs.readSequences(seqFileReader);
    OpdfReader<? extends Opdf<O>> opdfReader = relatedObjs.opdfReader();
    OpdfWriter<? extends Opdf<O>> opdfWriter = relatedObjs.opdfWriter();
   
    Hmm<O> initHmm = HmmReader.read(hmmFileReader, opdfReader);
    BaumWelchLearner bw = new BaumWelchScaledLearner();
    bw.setNbIterations(nbIterations);
    Hmm<O> hmm = bw.learn(initHmm, seqs);
    HmmWriter.write(hmmFileWriter, opdfWriter, hmm);
  }
View Full Code Here


    List<List<ObservationDiscrete<Packet>>> sequences;
    sequences = generateSequences(hmm);
   
    /* Baum-Welch learning */
   
    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);
   
    /* Computing the probability of a sequence */
 
View Full Code Here

TOP

Related Classes of be.ac.ulg.montefiore.run.jahmm.learn.BaumWelchLearner

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.