![]() |
aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
|
Exact inference for k-order dynamic Bayesian networks: Murphy's interface algorithm, extended to interventions. More...
#include <map>#include <memory>#include <set>#include <string>#include <variant>#include <vector>#include <agrum/agrum.h>#include <agrum/base/graphs/algorithms/triangulations/defaultTriangulation.h>#include <agrum/base/variables/discreteVariable.h>#include <agrum/KTBN/KTBN.h>#include <unordered_map>#include <unordered_set>#include <agrum/KTBN/inference/KTBNInference_tpl.h>Go to the source code of this file.
Classes | |
| class | gum::KTBNInference< GUM_SCALAR > |
| Exact inference on a gum::KTBN with observations and interventions, by the interface algorithm. More... | |
| struct | gum::KTBNInference< GUM_SCALAR >::_Series_ |
| A cached marginal time-series for one base: owned variable descriptors paired with their marginals, indexed by slice (single entry for an atemporal base). Descriptors are owned so tensors get a stable per-slice name rather than the reused ring-slot name they came from. More... | |
| struct | gum::KTBNInference< GUM_SCALAR >::_Slot_ |
One node of a window template: a base (index into baseNames) at a lag behind the window's current slice. lag == ATEMPORAL marks an atemporal base, which sits in every interface and never ages. More... | |
| struct | gum::KTBNInference< GUM_SCALAR >::_Window_ |
| A compiled window: the junction tree of \(H_t = I_{t-1} \cup V_t\), rooted at the clique holding \(I_t\), plus everything needed to fill and message-pass it. Built once; windows 0..k-2 are the initial ones, window k-1 is the repeating one, re-entered from slice k-1 on. More... | |
Namespaces | |
| namespace | gum |
| gum is the global namespace for all aGrUM entities | |
Variables | |
| template class GUM_PUBLIC_KTBN | gum::KTBNInference< double > |
Exact inference for k-order dynamic Bayesian networks: Murphy's interface algorithm, extended to interventions.
KTBNInference answers queries on a gum::KTBN under any mix of observations \(V[t]=v\) (soft or hard) and hard interventions \(do(V[t]=v)\), returning \(P(\text{target}[t] \mid \text{obs}, do(\cdot))\) for every declared target at every slice.
Inference runs on a chain of windows: window t covers \(H_t = I_{t-1} \cup V_t\), compiled once (at construction) into a junction tree by moralising its families, forcing \(I_{t-1}\) and \(I_t\) each into a clique, and triangulating. Time-homogeneity means every window from \(t=k-1\) on has the same shape, so one junction tree serves the whole repeating part, re-entered each step with fresh potentials; only the \(k-1\) initial windows get their own trees. A slice's variables are ring slots \((t-\delta) \bmod k\), so advancing is a relabelling, never an allocation – the model is never unrolled.
Within a window, Shafer-Shenoy message passing (collect then distribute, no division) combines potentials; neighbouring windows exchange \(m_t\) forward and \(r_t\) backward over their shared interface. Cost per slice is \(O(K^{w})\), w the fixed window's triangulation width – independent of the horizon.
Definition in file KTBNInference.h.