Package aima.core.probability.proposition

Examples of aima.core.probability.proposition.DisjunctiveProposition


    System.out.println("P(cavity) = " + model.prior(acavity));
    System.out.println("P(cavity | toothache) = "
        + model.posterior(acavity, atoothache));

    // AIMA3e pg. 492
    DisjunctiveProposition cavityOrToothache = new DisjunctiveProposition(
        acavity, atoothache);
    System.out.println("P(cavity OR toothache) = "
        + model.prior(cavityOrToothache));

    // AIMA3e pg. 493
View Full Code Here


    // Test a disjunctive proposition pg.489
    // P(a OR b) = P(a) + P(b) - P(a AND b)
    // = 1/6 + 1/6 - 1/36
    AssignmentProposition dice2Is5 = new AssignmentProposition(
        ExampleRV.DICE_2_RV, 5);
    DisjunctiveProposition dice1Is5OrDice2Is5 = new DisjunctiveProposition(
        dice1Is5, dice2Is5);
    Assert.assertEquals(1.0 / 6.0 + 1.0 / 6.0 - 1.0 / 36.0,
        model.prior(dice1Is5OrDice2Is5), DELTA_THRESHOLD);
  }
View Full Code Here

    Assert.assertEquals(0.0,
        model.posterior(acavity, atoothache, anotcavity),
        DELTA_THRESHOLD);

    // AIMA3e pg. 492
    DisjunctiveProposition cavityOrToothache = new DisjunctiveProposition(
        acavity, atoothache);
    Assert.assertEquals(0.28, model.prior(cavityOrToothache),
        DELTA_THRESHOLD);

    // AIMA3e pg. 493
View Full Code Here

TOP

Related Classes of aima.core.probability.proposition.DisjunctiveProposition

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.