120 likes | 259 Views
Inference. Probabilistic Graphical Models. Variable Elimination. Complexity Analysis. Eliminating Z. Reminder: Factor Product. N k =|Val( X k )|. Cost: (m k -1) N k multiplications. Reminder: Factor Marginalization. N k =|Val( X k )|. Cost: ~ N k additions.
E N D
Inference Probabilistic Graphical Models Variable Elimination Complexity Analysis
Reminder: Factor Product Nk=|Val(Xk)| Cost: (mk-1)Nk multiplications
Reminder: Factor Marginalization Nk=|Val(Xk)| Cost: ~Nkadditions
Complexity of Variable Elimination • Start with m factors • m n for Bayesian networks • can be larger for Markov networks • At each elimination step generate • At most elimination steps • Total number of factors: m*
Complexity of Variable Elimination • N = max(Nk) = size of the largest factor • Product operations: k(mk-1)Nk • Sum operations: kNk • Total work is linear in N and m*
Complexity of Variable Elimination • Total work is linear in N and m • Nk=|Val(Xk)|=O(drk) where • d = max(|Val(Xi)|) • rk = |Xk| = cardinality of the scope of the kth factor
Complexity Example C I D D G S L J H
Complexity and Elimination Order C • Eliminate: G I D D G S L J H
Complexity and Elimination Order A A Eliminate A first: … … B1 B1 B2 B2 B3 B3 Bk Bk C C Eliminate Bi‘s first:
Summary • Complexity of variable elimination linear in • size of the model (# factors, # variables) • size of the largest factor generated • Size of factor is exponential in its scope • Complexity of algorithm depends heavily on elimination ordering