Package aima.core.probability.hmm

Examples of aima.core.probability.hmm.HiddenMarkovModel


  public static void forwardBackWardDemo() {

    System.out.println("\nForward BackWard Demo\n");

    HiddenMarkovModel rainmanHmm = HMMFactory.createRainmanHMM();
    System.out
        .println("Creating a Hdden Markov Model to represent the model in Fig 15.5 ");
    List<String> perceptions = new ArrayList<String>();
    perceptions.add(HmmConstants.SEE_UMBRELLA);
    perceptions.add(HmmConstants.SEE_UMBRELLA);

    List<VarDistribution> results = rainmanHmm
        .forward_backward(perceptions);

    VarDistribution smoothedDayOne = results.get(1);
    System.out.println("Smoothed Probability Of Raining on Day One = "
        + smoothedDayOne.getProbabilityOf(HmmConstants.RAINING));
View Full Code Here


  }

  public static void particleFilterinfDemo() {
    System.out.println("\nParticle Filtering Demo\n");
    HiddenMarkovModel rainman = HMMFactory.createRainmanHMM();
    Randomizer r = new JavaRandomizer();
    ParticleSet starting = rainman.prior().toParticleSet(rainman, r, 1000);
    System.out.println("at the beginning, "
        + starting.numberOfParticlesWithState(HmmConstants.RAINING)
        + " particles 0f 1000 indicate status == 'raining' ");
    System.out.println("at the beginning, "
        + starting.numberOfParticlesWithState(HmmConstants.NOT_RAINING)
View Full Code Here

TOP

Related Classes of aima.core.probability.hmm.HiddenMarkovModel

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.