hbayes-0.5.2: Bayesian Networks

Safe Haskell None Haskell2010

Bayes.VariableElimination

Description

Algorithms for variable elimination

Synopsis

# Inferences

Arguments

 :: (Graph g, IsBucketItem f, Factor f, Show f, BayesianDiscreteVariable dva, BayesianDiscreteVariable dvb) => BayesianNetwork g f Bayesian Network -> EliminationOrder dva Ordering of variables to marginalize -> EliminationOrder dvb 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, IsBucketItem f, Factor f, Show f, BayesianDiscreteVariable dva, BayesianDiscreteVariable dvb) => BayesianNetwork g f Bayesian Network -> EliminationOrder dva Ordering of variables to marginzalie -> EliminationOrder dvb Ordering of remaining variables -> [DVI] Assignment for some factors in variables to marginalize -> f

# Interaction graph and elimination order

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

Compute the interaction graph of the BayesianNetwork

degreeOrder :: (FoldableWithVertex g, Factor f, Graph g) => BayesianNetwork g f -> EliminationOrder DV -> Int Source

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

 :: (IsBucketItem f, Factor f) => [f] Bayesian Network -> EliminationOrder DV Ordering of variables to marginalize -> EliminationOrder DV Ordering of remaining variables -> [DVI] Assignment for some factors in variables to marginalize -> f

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

Arguments

 :: [CPT] Bayesian Network -> EliminationOrder DV Ordering of variables to marginalize -> EliminationOrder DV Ordering of remaining variables -> [DVI] Assignment for some factors in variables to marginalize -> MAXCPT

Compute the prior marginal. All the variables in the elimination order are conditionning variables ( p( . | conditionning variables) ) First we sum, then we maximize for the remaining variables

Arguments

 :: (Graph g, BayesianDiscreteVariable dva, BayesianDiscreteVariable dvb) => BayesianNetwork g CPT Bayesian network defining the factors -> EliminationOrder dva Ordering of variables to sum out (should contain evidence variables) -> EliminationOrder dvb Ordering of remaining variables (to maximize) -> [DVI] Assignment -> [DVISet] MPE or MAP instantiation

Most Probable Explanation (or Maximum A Posteriori estimator) when restricted to a subest of variables in output

type EliminationOrder dv = [dv] Source

Elimination order