KTBNInference.windowJunctionTree
- KTBNInference.windowJunctionTree()
Introspection only: the junction tree of the repeating window, compiled from the k-slice template and re-entered at every step from slice k on. The windows are compiled again when the targets or the observations change the variables needed by the queries.
- Returns:
a copy of the current junction tree of the window: later changes of the inference (observations, targets…) do not modify it
- Return type:
Example
import pyagrum as gum
import pyagrum.ktbn as ktbn
model = ktbn.KTBN.fromBN(gum.fastBN("X0->X1"))
model.cpt("X", 0).fillWith([0.5, 0.5])
model.cpt("X", 1).fillWith([0.9, 0.1, 0.2, 0.8]) # P(X[t] | X[t-1])
ie = ktbn.KTBNInference(model)
jt = ie.windowJunctionTree()
jt.size() # number of cliques
# 1
Class