Examples of computeMarginals()


Examples of cc.mallet.grmm.inference.JunctionTreeInferencer.computeMarginals()

    }

    // STEP 2: Compute marginals

    Inferencer inf = new JunctionTreeInferencer ();
    inf.computeMarginals (mdl);

    // STEP 3: Collect the results
    //   We'll just print them out

    for (int varnum = 0; varnum < allVars.length; varnum++) {
View Full Code Here

Examples of cc.mallet.grmm.inference.TRP.computeMarginals()

  {
    FactorGraph grid = RandomGraphs.randomAttractiveGrid (5, 0.5, new Random (2413421));
    TRP trp = new TRP (new TRP.IterationTerminator (1));
    trp.setRandomSeed (14312341);

    trp.computeMarginals (grid);

    boolean oneIsDifferent = false;

    // check no exceptions thrown when asking for all marginals,
    //  and check that at least one factors' belief has changed
View Full Code Here

Examples of cc.mallet.grmm.inference.TRP.computeMarginals()

  {
    FactorGraph fg = createBoltzmannChain (5);
    Assignment assn = fg.sampleContinuousVars (new Randoms (23423));
    FactorGraph sliced = (FactorGraph) fg.slice (assn);
    Inferencer bp = new TRP ();
    bp.computeMarginals (sliced);

    try {
      bp.lookupMarginal (new Variable (2));
      fail ("Expected exception");
    } catch (IllegalArgumentException e) {
View Full Code Here

Examples of cc.mallet.grmm.inference.TRP.computeMarginals()

  {
    FactorGraph fg = createBoltzmannChain (5);
    Assignment assn = fg.sampleContinuousVars (new Randoms (23423));
    FactorGraph sliced = (FactorGraph) fg.slice (assn);
    Inferencer bp = new TRP ();
    bp.computeMarginals (sliced);

    try {
      bp.lookupMarginal (new Variable (2));
      fail ("Expected exception");
    } catch (IllegalArgumentException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.