Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cc.mallet.grmm.inference
Class Utils

    java.lang.Object
      cc.mallet.grmm.inference.Utils

    public class Utils

extends java.lang.Object

A bunch of static utilities useful for dealing with Inferencers. Created: Jun 1, 2005

Version:
  $Id: Utils.java,v 1.1 2007/10/22 21:37:49 mccallum Exp $
Author:

  Constructor Summary
  `Utils()`

  Method Summary
  `static double[]` | `allL1MarginalDistance(FactorGraph mdl, Inferencer inf1, Inferencer inf2)`
  `static double` | `avgL1MarginalDistance(FactorGraph mdl, Inferencer inf1, Inferencer inf2)`
  `static VarSet` | `defaultIntersection(VarSet v1, VarSet v2)`
  `static double` | `localMagnetization(Inferencer inferencer, Variable var)`
  `static double` | `lookupMinusLogZ(FactorGraph mdl, Inferencer inf)` Returns ths value of -log Z in mdl according to the given inferencer.
  `static double` | `maxL1MarginalDistance(FactorGraph mdl, Inferencer inf1, Inferencer inf2)`
  `static int[]` | `toSizesArray(Variable[] vars)`

  Methods inherited from class java.lang.Object
  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  Constructor Detail

  ### Utils

      public Utils()

  Method Detail

  ### lookupMinusLogZ

      public static double lookupMinusLogZ(FactorGraph mdl,
                                           Inferencer inf)

    Returns ths value of -log Z in mdl according to the given inferencer. If inf is exact, the answer will be exact; otherwise the answer will be approximation

    Parameters:
      `mdl` -
      `inf` - An inferencer. `inf.computeMarginals (mdl)` must already have been called.
    Returns:
      The value of -logZ

  ### localMagnetization

      public static double localMagnetization(Inferencer inferencer,
                                              Variable var)

  ### allL1MarginalDistance

      public static double[] allL1MarginalDistance(FactorGraph mdl,
                                                   Inferencer inf1,
                                                   Inferencer inf2)

  ### avgL1MarginalDistance

      public static double avgL1MarginalDistance(FactorGraph mdl,
                                                 Inferencer inf1,
                                                 Inferencer inf2)

  ### maxL1MarginalDistance

      public static double maxL1MarginalDistance(FactorGraph mdl,
                                                 Inferencer inf1,
                                                 Inferencer inf2)

  ### toSizesArray

      public static int[] toSizesArray(Variable[] vars)

  ### defaultIntersection

      public static VarSet defaultIntersection(VarSet v1,
                                               VarSet v2)

  Overview | Package | Class | Use | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD