ananke.inference

ananke.inference.variable_elimination

ananke.inference.variable_elimination.variable_elimination(bayesian_network, variables, elimination_order_alg='minfill')[source]

Implements the exact inference variable elimination algorithm to compute marginals of a Bayesian Network.

Parameters
  • bayesian_network – An ananke.BayesianNetwork representing the graph

  • variables – A list of variables representing the desired marginal

  • elimination_order_alg – Name of elimination order algorithm (supplied by

pgmpy.inference.EliminationOrder)