|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.grmm.inference.AbstractInferencer cc.mallet.grmm.inference.JunctionTreeInferencer
public class JunctionTreeInferencer
Does inference in general graphical models using the Hugin junction tree algorithm. Created: Mon Nov 10 23:58:44 2003
Field Summary | |
---|---|
protected JunctionTree |
jtCurrent
|
Constructor Summary | |
---|---|
JunctionTreeInferencer()
|
|
JunctionTreeInferencer(cc.mallet.grmm.inference.JunctionTreePropagation propagator)
|
Method Summary | |
---|---|
JunctionTree |
buildJunctionTree(FactorGraph mdl)
Constructs a junction tree from a given factor graph. |
void |
computeMarginals(FactorGraph mdl)
Computes marginal distributions for a factor graph. |
void |
computeMarginals(JunctionTree jt)
|
static JunctionTreeInferencer |
createForMaxProduct()
|
void |
dump()
|
double |
dumpLogJoint(Assignment assn)
|
int |
getTotalMessagesSent()
Returns the total number of messages this inferencer has sent. |
JunctionTree |
lookupJunctionTree()
Returns the JunctionTree computed from the last call to computeMarginals(cc.mallet.grmm.types.FactorGraph) . |
double |
lookupLogJoint(Assignment assn)
Returns the natural logarithm of the joint probability of a given assignment, computed in some factorized fashion. |
Factor |
lookupMarginal(Variable var)
Returns the computed marginal of a given variable. |
Factor |
lookupMarginal(VarSet varSet)
Returns the computed marginal of a given clique in a graph. |
Variable |
pickVertexToRemove(org._3pq.jgrapht.UndirectedGraph mdl,
java.util.ArrayList lst)
|
Methods inherited from class cc.mallet.grmm.inference.AbstractInferencer |
---|
duplicate, lookupJoint, query, reportTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient JunctionTree jtCurrent
Constructor Detail |
---|
public JunctionTreeInferencer()
public JunctionTreeInferencer(cc.mallet.grmm.inference.JunctionTreePropagation propagator)
Method Detail |
---|
public static JunctionTreeInferencer createForMaxProduct()
public Variable pickVertexToRemove(org._3pq.jgrapht.UndirectedGraph mdl, java.util.ArrayList lst)
public void computeMarginals(FactorGraph mdl)
Inferencer
computeMarginals
in interface Inferencer
computeMarginals
in class AbstractInferencer
public void computeMarginals(JunctionTree jt)
public JunctionTree buildJunctionTree(FactorGraph mdl)
mdl
- Factor graph to compute JT for.public Factor lookupMarginal(Variable var)
Inferencer
lookupMarginal
in interface Inferencer
lookupMarginal
in class AbstractInferencer
Inferencer.computeMarginals(FactorGraph)
public Factor lookupMarginal(VarSet varSet)
Inferencer
lookupMarginal
in interface Inferencer
lookupMarginal
in class AbstractInferencer
Inferencer.computeMarginals(cc.mallet.grmm.types.FactorGraph)
,
#computeMarginals(JunctionTree)
public double lookupLogJoint(Assignment assn)
Inferencer
This method is less likely to underflow than
Math.log (lookupJoint (assn))
.
lookupLogJoint
in interface Inferencer
lookupLogJoint
in class AbstractInferencer
Inferencer.computeMarginals(cc.mallet.grmm.types.FactorGraph)
,
#computeMarginals(JunctionTree)
public double dumpLogJoint(Assignment assn)
public JunctionTree lookupJunctionTree()
computeMarginals(cc.mallet.grmm.types.FactorGraph)
. Caller must not modify return value.
public void dump()
dump
in interface Inferencer
dump
in class AbstractInferencer
public int getTotalMessagesSent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |