Package aima.core.probability.hmm

Examples of aima.core.probability.hmm.VarDistribution


  }

  @Test
  public void testParticleSetConversionToRandomVariable() {

    VarDistribution rv = particleSet.toRandomVariable();
    Assert.assertEquals(0.75, rv.getProbabilityOf(HmmConstants.RAINING),
        0.001);
    Assert.assertEquals(0.25,
        rv.getProbabilityOf(HmmConstants.NOT_RAINING), 0.001);
  }
View Full Code Here


        rv.getProbabilityOf(HmmConstants.NOT_RAINING), 0.001);
  }

  @Test
  public void testRoundTripConversion() {
    VarDistribution rv = particleSet.toRandomVariable();
    Randomizer r = new MockRandomizer(new double[] { 0.1, 0.2, 0.3, 0.4,
        0.9 });
    ParticleSet ps2 = rv.toParticleSet(rainman, r, 10);
    Assert.assertEquals(8,
        ps2.numberOfParticlesWithState(HmmConstants.RAINING));
    Assert.assertEquals(2,
        ps2.numberOfParticlesWithState(HmmConstants.NOT_RAINING));
  }
View Full Code Here

TOP

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

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.