hbayes-0.2.1: Inference with Discrete Bayesian Networks

Bayes.VariableElimination

Description

Algorithms for variable elimination

Synopsis

# Inferences

Arguments

 :: (Graph g, Factor f, Show f) => BayesianNetwork g f Bayesian Network -> EliminationOrder Ordering of variables to marginalize -> EliminationOrder Ordering of remaining to keep in result -> f

Compute the prior marginal. All the variables in the elimination order are conditionning variables ( p( . | conditionning variables) )

Arguments

 :: (Graph g, Factor f, Show f) => BayesianNetwork g f Bayesian Network -> EliminationOrder Ordering of variables to marginzalie -> EliminationOrder Ordering of remaining variables -> [DVI Int] Assignment for some factors in vaiables to marginalize -> f

# Interaction graph and elimination order

interactionGraph :: (FoldableWithVertex g, Factor f, UndirectedGraph g') => BayesianNetwork g f -> g' () DVSource

Compute the interaction graph of the BayesianNetwork

degreeOrder :: (FoldableWithVertex g, Factor f, Graph g) => BayesianNetwork g f -> EliminationOrder -> IntSource

Compute the degree order of an elimination order

Elimination order minimizing the degree

Elimination order minimizing the filling

allVariables :: (Graph g, Factor f) => BayesianNetwork g f -> [DV]Source

Get all variables from a Bayesian Network

Arguments

 :: Factor f => [f] Bayesian Network -> EliminationOrder Ordering of variables to marginzalie -> EliminationOrder Ordering of remaining variables -> [DVI Int] Assignment for some factors in vaiables to marginalize -> f

Compute the prior marginal. All the variables in the elimination order are conditionning variables ( p( . | conditionning variables) )

type EliminationOrder = [DV]Source

Elimination order