|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javaslam.tjt.ThinJunctionTree.Contraction
Represents a variable contraction of a variable v
along an edge e
= Ci ->
Cj. If this contraction is executed, then the
v is marginalized out of the cluster Cj
and also from the separator potential of e
. If
there are other edges emanating from Cj that
carry v, then v is first (recursively) contracted
along these edges. This operation preserves the singly-connected
and running-intersection properties (as well as consistency), but
violates the potential property. Thus, it results in a junction
tree that is valid for some graphical model, but not that of the
original junction tree.
Field Summary | |
protected List |
descendants
If not null , this is a list of ThinJunctionTree.Contraction s that must first be executed
before this contraction can be executed. |
JunctionTree.JTEdge |
e
The edge along which the variable is to be contracted. |
protected double |
err
The approximation error induced by this contraction. |
Variable |
v
The variable to contracted. |
Constructor Summary | |
ThinJunctionTree.Contraction(JunctionTree.JTEdge e,
Variable v)
Constructor. |
|
ThinJunctionTree.Contraction(JunctionTree.JTEdge e,
Variable v,
boolean local)
Constructor. |
|
ThinJunctionTree.Contraction(JunctionTree.JTEdge e,
Variable v,
boolean local,
double error)
Constructor. |
Method Summary | |
double |
computeError()
Computes the approximation error introduced by a variable contraction along an edge e = Ci
-> Cj. |
boolean |
equals(Object o)
Returns true if this and the supplied object are
equal. |
double |
error()
Returns the approximation error that will result if this contraction is executed, which is the relative entropy (or Kullback-Lieblier divergence) from the original distribution to the resulting distribution. |
void |
execute()
Executes the edge contraction. |
int |
hashCode()
Returns the hash code of this edge contraction. |
protected void |
initialize(JunctionTree.JTEdge e,
Variable v,
boolean local)
Initializer. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Variable v
public JunctionTree.JTEdge e
protected List descendants
null
, this is a list of ThinJunctionTree.Contraction
s that must first be executed
before this contraction can be executed.
protected double err
Constructor Detail |
public ThinJunctionTree.Contraction(JunctionTree.JTEdge e, Variable v, boolean local)
e
- an edge in the junction treev
- a variable contained in the cluster to which
e
is directedlocal
- if true
, then this contraction assumes that
the cluster to which e
is directed is a
leaf in the subtree induced by v
and does
not perform any recursive contractions
IllegalArgumentException
- if either of the clusters incident
to e
do not contain
v
public ThinJunctionTree.Contraction(JunctionTree.JTEdge e, Variable v)
e
- an edge in the junction treev
- a variable contained in the cluster to which
e
is directed
IllegalArgumentException
- if either of the clusters incident
to e
do not contain
v
public ThinJunctionTree.Contraction(JunctionTree.JTEdge e, Variable v, boolean local, double error)
e
- an edge in the junction treev
- a variable contained in the cluster to which
e
is directedlocal
- if true
, then this contraction assumes that
the cluster to which e
is directed is a
leaf in the subtree induced by v
and does
not perform any recursive contractionserror
- the error of this contraction
IllegalArgumentException
- if either of the clusters incident
to e
do not contain
v
Method Detail |
protected void initialize(JunctionTree.JTEdge e, Variable v, boolean local)
e
- an edge in the junction treev
- a variable contained in the cluster to which
e
is directedlocal
- if true
, then this contraction assumes that
the cluster to which e
is directed is a
leaf in the subtree induced by v
and does
not perform any recursive contractions
IllegalArgumentException
- if either of the clusters incident
to e
do not contain
v
public double error()
public void execute()
public double computeError()
e
= Ci
-> Cj. This approximation error is the
Kullback-Liebler divergence from the original junction tree's
distribution to the distribution that would result if execute()
were called.
If the terminus Cj is a leaf of the
subtree induced by v
, then the approximation error
is the conditional mutual information
v
| S)e
. If Cj is not a leaf of the
subtree induced by v
, then the approximation error
is the sum of the contraction errors of v
along
all edges Cj -> Ck (except
Cj -> Ci).
execute()
were calledpublic boolean equals(Object o)
true
if this and the supplied object are
equal. Two edge contractions are equal if their edges and
variables are the same.
equals
in class Object
true
if this and the supplied object are
equalpublic int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |